public void set( String propertyName, Object value ) { if (!propertyName.equalsIgnoreCase( "value" )) { super.set( propertyName, value ); } else if (value instanceof Number) { setValue( HttpUnitUtils.trimmedValue( (Number) value ) ); } else { setValue( (value == null) ? null : value.toString() ); } } }
public void set( String propertyName, Object value ) { if (!propertyName.equalsIgnoreCase( "value" )) { super.set( propertyName, value ); } else if (value instanceof Number) { setValue( HttpUnitUtils.trimmedValue( (Number) value ) ); } else { setValue( (value == null) ? null : value.toString() ); } } }
public void set( String propertyName, Object value ) { if (!propertyName.equalsIgnoreCase( "value" )) { super.set( propertyName, value ); } else if (value instanceof Number) { setValue( HttpUnitUtils.trimmedValue( (Number) value ) ); } else { setValue( (value == null) ? null : value.toString() ); } } }
/** * 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 ); } }
/** * 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 ); } }