/** * Returns an array containing all of the buttons defined for this form. **/ public Button[] getButtons() { if (_buttons == null) { FormControl[] controls = getFormControls(); ArrayList buttonList = new ArrayList(); for (int i = 0; i < controls.length; i++) { FormControl control = controls[ i ]; if (control instanceof Button) buttonList.add( control ); } _buttons = (Button[]) buttonList.toArray( new Button[ buttonList.size() ] ); } return _buttons; }
/** * Returns an array containing all of the buttons defined for this form. **/ public Button[] getButtons() { if (_buttons == null) { FormControl[] controls = getFormControls(); ArrayList buttonList = new ArrayList(); for (int i = 0; i < controls.length; i++) { FormControl control = controls[ i ]; if (control instanceof Button) buttonList.add( control ); } _buttons = (Button[]) buttonList.toArray( new Button[ buttonList.size() ] ); } return _buttons; }
/** * Returns an array containing all of the buttons defined for this form. **/ public Button[] getButtons() { if (_buttons == null) { FormControl[] controls = getFormControls(); ArrayList buttonList = new ArrayList(); for (int i = 0; i < controls.length; i++) { FormControl control = controls[ i ]; if (control instanceof Button) buttonList.add( control ); } _buttons = (Button[]) buttonList.toArray( new Button[ buttonList.size() ] ); } return _buttons; }
private void resetControls() { FormControl[] controls = getFormControls(); for (int i = 0; i < controls.length; i++) { controls[i].reset(); } }
/** * Returns the form control which is part of this form with the specified ID. */ public FormControl getControlWithID( String id ) { FormControl[] controls = getFormControls(); for (int i = 0; i < controls.length; i++) { FormControl control = controls[i]; if (control.getID().equals(id)) return control; } return null; }
/** * Returns the form control which is part of this form with the specified ID. */ public FormControl getControlWithID( String id ) { FormControl[] controls = getFormControls(); for (int i = 0; i < controls.length; i++) { FormControl control = controls[i]; if (control.getID().equals(id)) return control; } return null; }
private void resetControls() { FormControl[] controls = getFormControls(); for (int i = 0; i < controls.length; i++) { controls[i].reset(); } }
private void resetControls() { FormControl[] controls = getFormControls(); for (int i = 0; i < controls.length; i++) { controls[i].reset(); } }
/** * Returns the form control which is part of this form with the specified ID. */ public FormControl getControlWithID( String id ) { FormControl[] controls = getFormControls(); for (int i = 0; i < controls.length; i++) { FormControl control = controls[i]; if (control.getID().equals(id)) return control; } return null; }
/** * Records a parameter defined by including it in the destination URL. Ignores any parameters whose name matches * a form control. **/ protected void addPresetParameter( String name, String value ) { FormControl[] formControls = getFormControls(); for (int i = 0; i < formControls.length; i++) { if (formControls[i].getName().equals( name)) return; } _presets.add( new PresetFormParameter( this, name, value ) ); }
/** * Records a parameter defined by including it in the destination URL. Ignores any parameters whose name matches * a form control. **/ protected void addPresetParameter( String name, String value ) { FormControl[] formControls = getFormControls(); for (int i = 0; i < formControls.length; i++) { if (formControls[i].getName().equals( name)) return; } _presets.add( new PresetFormParameter( this, name, value ) ); }
/** * Records a parameter defined by including it in the destination URL. Ignores any parameters whose name matches * a form control. **/ protected void addPresetParameter( String name, String value ) { FormControl[] formControls = getFormControls(); for (int i = 0; i < formControls.length; i++) { if (formControls[i].getName().equals( name)) return; } _presets.add( new PresetFormParameter( this, name, value ) ); }
/** * Iterates through the parameters in this holder, recording them in the supplied parameter processor. **/ public void recordParameters( ParameterProcessor processor ) throws IOException { FormControl[] controls = getFormControls(); for (int i = 0; i < controls.length; i++) { controls[i].addValues( processor, getCharacterSet() ); } }
/** * get the Vector of submit buttons - will always contain at least * one button - if the original vector has none a faked submit button will be added * @return a Vector with the submit buttons */ private Vector getSubmitButtonVector() { if (_buttonVector == null) { _buttonVector = new Vector(); FormControl[] controls = getFormControls(); for (int i = 0; i < controls.length; i++) { FormControl control = controls[ i ]; if (control instanceof SubmitButton) { SubmitButton sb=(SubmitButton)control; sb.rememberEnableState(); _buttonVector.add( sb ); } } /** * make sure that there is always at least one submit button * if none is in the Vector add a faked one */ if (_buttonVector.isEmpty()) _buttonVector.addElement( SubmitButton.createFakeSubmitButton( this ) ); } return _buttonVector; }
/** * Iterates through the parameters in this holder, recording them in the supplied parameter processor. **/ public void recordParameters( ParameterProcessor processor ) throws IOException { FormControl[] controls = getFormControls(); for (int i = 0; i < controls.length; i++) { controls[i].addValues( processor, getCharacterSet() ); } }
/** * Iterates through the parameters in this holder, recording them in the supplied parameter processor. **/ public void recordParameters( ParameterProcessor processor ) throws IOException { FormControl[] controls = getFormControls(); for (int i = 0; i < controls.length; i++) { controls[i].addValues( processor, getCharacterSet() ); } }
/** * Returns a map of parameter name to form parameter objects. Each form parameter object represents the set of form * controls with a particular name. Unnamed parameters are ignored. */ private Map getFormParameters() { Map formParameters = new HashMap(); loadFormParameters( formParameters, getPresetParameters() ); loadFormParameters( formParameters, getFormControls() ); return formParameters; }
/** * get the Vector of submit buttons - will always contain at least * one button - if the original vector has none a faked submit button will be added * @return a Vector with the submit buttons */ private Vector getSubmitButtonVector() { if (_buttonVector == null) { _buttonVector = new Vector(); FormControl[] controls = getFormControls(); for (int i = 0; i < controls.length; i++) { FormControl control = controls[ i ]; if (control instanceof SubmitButton) { SubmitButton sb=(SubmitButton)control; sb.rememberEnableState(); _buttonVector.add( sb ); } } /** * make sure that there is always at least one submit button * if none is in the Vector add a faked one */ if (_buttonVector.isEmpty()) _buttonVector.addElement( SubmitButton.createFakeSubmitButton( this ) ); } return _buttonVector; }
/** * Returns a map of parameter name to form parameter objects. Each form parameter object represents the set of form * controls with a particular name. Unnamed parameters are ignored. */ private Map getFormParameters() { Map formParameters = new HashMap(); loadFormParameters( formParameters, getPresetParameters() ); loadFormParameters( formParameters, getFormControls() ); return formParameters; }
/** * Returns a map of parameter name to form parameter objects. Each form parameter object represents the set of form * controls with a particular name. Unnamed parameters are ignored. */ private Map getFormParameters() { Map formParameters = new HashMap(); loadFormParameters( formParameters, getPresetParameters() ); loadFormParameters( formParameters, getFormControls() ); return formParameters; }