public boolean matchesCriteria( Object button, Object label ) { return ((Button) button).getValue().equals( label ); } };
public boolean matchesCriteria( Object button, Object label ) { return ((Button) button).getValue().equals( label ); } };
public boolean matchesCriteria( Object button, Object label ) { return ((Button) button).getValue().equals( label ); } };
IllegalSubmitButtonException( SubmitButton button ) { _name = button.getName(); _value = button.getValue(); }
DisabledButtonException( Button button ) { _name = button.getName(); _value = button.getValue(); }
public int hashCode() { return getName().hashCode() + getValue().hashCode(); }
DisabledButtonException( Button button ) { _name = button.getName(); _value = button.getValue(); }
public String toString() { return "Submit with " + getName() + "=" + getValue(); }
DisabledButtonException( Button button ) { _name = button.getName(); _value = button.getValue(); }
/** * Returns the submit button defined in this form with the specified name and value. * If more than one such button exists, will return the first found. * If no such button is found, will return null. **/ public SubmitButton getSubmitButton( String name, String value ) { SubmitButton[] buttons = getSubmitButtons(); for (int i = 0; i < buttons.length; i++) { if (buttons[i].getName().equals( name ) && buttons[i].getValue().equals( value )) { return buttons[i]; } } return null; }
/** * Returns the current value(s) associated with this control. These values will be transmitted to the server * if the control is 'successful'. **/ protected String[] getValues() { return (isDisabled() || !_pressed) ? NO_VALUE : toArray( getValue() ); }
/** * addValues if not disabled and pressed * @param processor - the ParameterProcessor used * @param characterSet - the active character set * @throws IOException if addValues fails */ protected void addValues( ParameterProcessor processor, String characterSet ) throws IOException { if (_pressed && !isDisabled()) { String buttonName = getName(); if (buttonName != null && buttonName.length() > 0 && getValue().length() > 0) { processor.addParameter( getName(), getValue(), characterSet ); } if (isValidImageButton()) { processor.addParameter( positionParameterName("x"), Integer.toString( _x ), characterSet ); processor.addParameter( positionParameterName("y"), Integer.toString( _y ), characterSet ); } } // if }