/** * get the Object for the given propertyName * @param propertyName - the name of the property to get * @return the Object for the property */ public Object get( String propertyName ) { if (propertyName.equals( "target" )) { return getTarget(); } else if (propertyName.equals( "action" )) { return getAction(); } else if (propertyName.equals( "length" )) { return new Integer(getFormControls().length); } else { final FormParameter parameter = getParameter( propertyName ); if (parameter != UNKNOWN_PARAMETER) return parameter.getScriptableObject(); FormControl control = getControlWithID( propertyName ); return control == null ? super.get( propertyName ) : control.getScriptingHandler(); } }
/** * Sets the value of the named property. Will throw a runtime exception if the property does not exist or * cannot accept the specified value. * @param propertyName - the name of the property * @param value - the new value **/ public void set( String propertyName, Object value ) { if (propertyName.equals( "target" )) { setTargetAttribute( value.toString() ); } else if (propertyName.equals( "action" )) { setAction( value.toString() ); } else if (value instanceof String) { setParameterValue( propertyName, (String) value ); } else if (value instanceof Number) { setParameterValue( propertyName, HttpUnitUtils.trimmedValue( (Number) value ) ); } else { super.set( propertyName, value ); } }
/** * get the Object for the given propertyName * @param propertyName - the name of the property to get * @return the Object for the property */ public Object get( String propertyName ) { if (propertyName.equals( "target" )) { return getTarget(); } else if (propertyName.equals( "action" )) { return getAction(); } else if (propertyName.equals( "length" )) { return new Integer(getFormControls().length); } else { final FormParameter parameter = getParameter( propertyName ); if (parameter != UNKNOWN_PARAMETER) return parameter.getScriptableObject(); FormControl control = getControlWithID( propertyName ); return control == null ? super.get( propertyName ) : control.getScriptingHandler(); } }
/** * get the Object for the given propertyName * @param propertyName - the name of the property to get * @return the Object for the property */ public Object get( String propertyName ) { if (propertyName.equals( "target" )) { return getTarget(); } else if (propertyName.equals( "action" )) { return getAction(); } else if (propertyName.equals( "length" )) { return new Integer(getFormControls().length); } else { final FormParameter parameter = getParameter( propertyName ); if (parameter != UNKNOWN_PARAMETER) return parameter.getScriptableObject(); FormControl control = getControlWithID( propertyName ); return control == null ? super.get( propertyName ) : control.getScriptingHandler(); } }
/** * Sets the value of the named property. Will throw a runtime exception if the property does not exist or * cannot accept the specified value. * @param propertyName - the name of the property * @param value - the new value **/ public void set( String propertyName, Object value ) { if (propertyName.equals( "target" )) { setTargetAttribute( value.toString() ); } else if (propertyName.equals( "action" )) { setAction( value.toString() ); } else if (value instanceof String) { setParameterValue( propertyName, (String) value ); } else if (value instanceof Number) { setParameterValue( propertyName, HttpUnitUtils.trimmedValue( (Number) value ) ); } else { super.set( propertyName, value ); } }
/** * Sets the value of the named property. Will throw a runtime exception if the property does not exist or * cannot accept the specified value. * @param propertyName - the name of the property * @param value - the new value **/ public void set( String propertyName, Object value ) { if (propertyName.equals( "target" )) { setTargetAttribute( value.toString() ); } else if (propertyName.equals( "action" )) { setAction( value.toString() ); } else if (value instanceof String) { setParameterValue( propertyName, (String) value ); } else if (value instanceof Number) { setParameterValue( propertyName, HttpUnitUtils.trimmedValue( (Number) value ) ); } else { super.set( propertyName, value ); } }
public Object jsFunction_getElementsByTagName( String name ) throws SAXException { return toElementArray( getDelegate().getElementsByTagName( name ) ); }
public Object jsFunction_getElementsByTagName( String name ) throws SAXException { return toElementArray( getDelegate().getElementsByTagName( name ) ); }
public ScriptableDelegate newScriptable() { return new Scriptable(); }
public String jsGet_name() { return getDelegate().getName(); }
public void jsSet_action( String action ) { getDelegate().setAction( action ); }
public void jsFunction_submit() throws IOException, SAXException { getDelegate().submit(); }
public Object jsFunction_getElementsByTagName( String name ) throws SAXException { return toElementArray( getDelegate().getElementsByTagName( name ) ); }
public String jsGet_name() { return getDelegate().getName(); }
public String jsGet_action() { return getDelegate().getAction(); }
public ScriptableDelegate[] getElementsByTagName( String name ) throws SAXException { return getDelegates( getHTMLPage().getElementsByTagName( getElement(), name ) ); }
public void jsSet_action( String action ) { getDelegate().setAction( action ); }
public void jsFunction_submit() throws IOException, SAXException { getDelegate().submit(); }
public String jsGet_name() { return getDelegate().getName(); }
public void jsFunction_reset() throws IOException, SAXException { getDelegate().reset(); }