1 57 package org.enhydra.apache.html.dom; 58 59 60 import org.enhydra.apache.xerces.dom.ElementImpl; 61 import org.w3c.dom.Node ; 62 import org.w3c.dom.NodeList ; 63 import org.w3c.dom.html.HTMLCollection; 64 import org.w3c.dom.html.HTMLFormElement; 65 66 67 73 public class HTMLFormElementImpl 74 extends HTMLElementImpl 75 implements HTMLFormElement 76 { 77 78 79 public HTMLCollection getElements() 80 { 81 if ( _elements == null ) 82 _elements = new HTMLCollectionImpl( this, HTMLCollectionImpl.ELEMENT ); 83 return _elements; 84 } 85 86 87 public int getLength() 88 { 89 return getElements().getLength(); 90 } 91 92 93 public String getName() 94 { 95 return getAttribute( "name" ); 96 } 97 98 99 public void setName( String name ) 100 { 101 setAttribute( "name", name ); 102 } 103 104 105 public String getAcceptCharset() 106 { 107 return getAttribute( "accept-charset" ); 108 } 109 110 111 public void setAcceptCharset( String acceptCharset ) 112 { 113 setAttribute( "accept-charset", acceptCharset ); 114 } 115 116 117 public String getAction() 118 { 119 return getAttribute( "action" ); 120 } 121 122 123 public void setAction( String action ) 124 { 125 setAttribute( "action", action ); 126 } 127 128 129 public String getEnctype() 130 { 131 return getAttribute( "enctype" ); 132 } 133 134 135 public void setEnctype( String enctype ) 136 { 137 setAttribute( "enctype", enctype ); 138 } 139 140 141 public String getMethod() 142 { 143 return capitalize( getAttribute( "method" ) ); 144 } 145 146 147 public void setMethod( String method ) 148 { 149 setAttribute( "method", method ); 150 } 151 152 153 public String getTarget() 154 { 155 return getAttribute( "target" ); 156 } 157 158 159 public void setTarget( String target ) 160 { 161 setAttribute( "target", target ); 162 } 163 164 165 public void submit() 166 { 167 } 169 170 171 public void reset() 172 { 173 } 175 176 180 public NodeList getChildNodes() { 181 return getChildNodesUnoptimized(); 182 } 183 184 188 public Node cloneNode( boolean deep ) { 189 HTMLFormElementImpl clonedNode = (HTMLFormElementImpl)super.cloneNode( deep ); 190 clonedNode._elements = null; 191 return clonedNode; 192 } 193 194 199 public HTMLFormElementImpl( HTMLDocumentImpl owner, String name ) 200 { 201 super( owner, name ); 202 } 203 204 205 208 private HTMLCollectionImpl _elements; 209 210 } 211 212 | Popular Tags |