/** * Returns the option values defined for the specified parameter name. **/ public String[] getOptionValues( String name ) { return getParameter( name ).getOptionValues(); }
/** * Returns true if the named parameter accepts multiple values. **/ public boolean isMultiValuedParameter( String name ) { return getParameter( name ).isMultiValuedParameter(); }
/** * Returns true if the named parameter is disabled. If more than one control exists with the same name, * will return true only if all such controls are read-only. **/ public boolean isDisabledParameter( String name ) { return getParameter( name ).isDisabledParameter(); }
/** * Returns the displayed options defined for the specified parameter name. **/ public String[] getOptions( String name ) { return getParameter( name ).getOptions(); }
/** * Returns true if the named parameter is hidden. If more than one control exists with the same name, * will return true only if all such controls are hidden. **/ public boolean isHiddenParameter( String name ) { return getParameter( name ).isHiddenParameter(); }
/** * Returns the option values defined for the specified parameter name. **/ public String[] getOptionValues( String name ) { return getParameter( name ).getOptionValues(); }
/** * Returns the displayed options defined for the specified parameter name. **/ public String[] getOptions( String name ) { return getParameter( name ).getOptions(); }
/** * Returns true if the named parameter accepts free-form text. **/ public boolean isTextParameter( String name ) { return getParameter( name ).isTextParameter(); }
/** * Returns true if the named parameter is disabled. If more than one control exists with the same name, * will return true only if all such controls are read-only. **/ public boolean isDisabledParameter( String name ) { return getParameter( name ).isDisabledParameter(); }
/** * Returns true if the named parameter is hidden. If more than one control exists with the same name, * will return true only if all such controls are hidden. **/ public boolean isHiddenParameter( String name ) { return getParameter( name ).isHiddenParameter(); }
/** * Returns the multiple default values of the named parameter. **/ public String[] getParameterValues( String name ) { final FormParameter parameter = getParameter( name ); return parameter.getValues(); }
/** * Returns the option values defined for the specified parameter name. **/ public String[] getOptionValues( String name ) { return getParameter( name ).getOptionValues(); }
/** * Returns true if the named parameter accepts files for upload. **/ public boolean isFileParameter( String name ) { return getParameter( name ).isFileParameter(); }
/** * Returns the number of text parameters in this form with the specified name. **/ public int getNumTextParameters( String name ) { return getParameter( name ).getNumTextParameters(); }
/** * Returns the number of text parameters in this form with the specified name. **/ public int getNumTextParameters( String name ) { return getParameter( name ).getNumTextParameters(); }
/** * Toggles the value of the specified checkbox parameter. * @param name the name of the checkbox parameter * @throws IllegalArgumentException if the specified parameter is not a checkbox or there is more than one * control with that name. * @since 1.5.4 */ public void toggleCheckbox( String name ) { FormParameter parameter = getParameter( name ); if (parameter == null) throw new NoSuchParameterException( name ); parameter.toggleCheckbox(); }
public void setParameterValue( String name, String value ) { final Object scriptableObject = getParameter( name ).getScriptableObject(); if (scriptableObject instanceof ScriptableDelegate) { ((ScriptableDelegate) scriptableObject).set( "value", value ); } else if (scriptableObject instanceof ScriptableDelegate[]) { ((ScriptableDelegate[]) scriptableObject)[0].set( "value", value ); } }
/** * Sets the multiple values of a file upload parameter in a web request. **/ public void setParameter( String name, UploadFileSpec[] files ) { FormParameter parameter = getParameter( name ); if ((parameter == null) || (!parameter.isFileParameter())) throw new NoSuchParameterException( name ); parameter.setFiles( files ); }
/** * Sets the multiple values of a parameter in this form. This is generally used when there are multiple * controls with the same name in the form. */ public void setParameter( String name, final String[] values ) { FormParameter parameter = getParameter( name ); if (parameter == UNKNOWN_PARAMETER) throw new NoSuchParameterException( name ); if (parameter.isFileParameter()) { throw new InvalidFileParameterException(name,values); } parameter.setValues( values ); }
/** * Sets the multiple values of a parameter in this form. This is generally used when there are multiple * controls with the same name in the form. */ public void setParameter( String name, final String[] values ) { FormParameter parameter = getParameter( name ); if (parameter == UNKNOWN_PARAMETER) throw new NoSuchParameterException( name ); if (parameter.isFileParameter()) { throw new InvalidFileParameterException(name,values); } parameter.setValues( values ); }