org.dspace.app.xmlui.wing.element
Class Select

java.lang.Object
  extended by org.dspace.app.xmlui.wing.element.AbstractWingElement
      extended by org.dspace.app.xmlui.wing.element.Field
          extended by org.dspace.app.xmlui.wing.element.Select
All Implemented Interfaces:
StructuralElement, WingElement

public class Select
extends Field


Field Summary
 
Fields inherited from class org.dspace.app.xmlui.wing.element.Field
A_DISABLED, A_FIELD_TYPE, A_REQUIRED, disabled, E_FIELD, errors, fields, help, instances, label, name, OPERATION_ADD, OPERATION_DELETE, OPERATIONS, options, params, rend, required, type, TYPE_BUTTON, TYPE_CHECKBOX, TYPE_COMPOSITE, TYPE_FILE, TYPE_HIDDEN, TYPE_PASSWORD, TYPE_RADIO, TYPE_SELECT, TYPE_TEXT, TYPE_TEXTAREA, TYPES, values
 
Fields inherited from class org.dspace.app.xmlui.wing.element.AbstractWingElement
context
 
Fields inherited from interface org.dspace.app.xmlui.wing.element.StructuralElement
A_ID, A_NAME, A_RENDER
 
Constructor Summary
protected Select(WingContext context, String name, String rend)
          Construct a new field.
 
Method Summary
 Instance addInstance()
          Add a field instance
 void addOption(boolean selected, int returnValue, Message message)
          Add a select option.
 void addOption(boolean selected, int returnValue, String characters)
          Add a select option.
 Option addOption(boolean selected, String returnValue)
          Add a select option.
 void addOption(boolean selected, String returnValue, Message message)
          Add a select option.
 void addOption(boolean selected, String returnValue, String characters)
          Add a select option.
 void addOption(int returnValue, Message message)
          Add a select option.
 void addOption(int returnValue, String characters)
          Add a select option.
 Option addOption(String returnValue)
          Add a select option.
 void addOption(String returnValue, Message message)
          Add a select option.
 void addOption(String returnValue, String characters)
          Add a select option.
 void enableAddOperation()
          Enable the add operation for this field.
 void enableDeleteOperation()
          Enable the delete operation for this field.
 void setEvtBehavior(String behavior)
          Set the event behavior attribute of the select item
 void setMultiple()
          Enable the user to select multiple options.
 void setMultiple(boolean multiple)
          Set whether the user is able to select multiple options.
 void setOptionSelected(int returnValue)
          Set the given option as selected.
 void setOptionSelected(String returnValue)
          Set the given option as selected.
 void setSize(int size)
          Set the number of options visible at any one time.
 
Methods inherited from class org.dspace.app.xmlui.wing.element.Field
addError, addError, addError, dispose, removeValueOfType, setAuthorityControlled, setAuthorityControlled, setAuthorityRequired, setAuthorityRequired, setAutofocus, setChoices, setChoicesClosed, setChoicesClosed, setChoicesPresentation, setDisabled, setDisabled, setHelp, setHelp, setHelp, setLabel, setLabel, setLabel, setRequired, setRequired, toSAX
 
Methods inherited from class org.dspace.app.xmlui.wing.element.AbstractWingElement
endElement, endElement, getWingContext, greater, lesser, require, require, requireFalse, requireTrue, restrict, sendCharacters, setWingContext, startElement, startElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Select

protected Select(WingContext context,
                 String name,
                 String rend)
          throws WingException
Construct a new field.

Parameters:
context - (Required) The context this element is contained in, such as where to route SAX events and what i18n catalogue to use.
name - (Required) a non-unique local identifier used to differentiate the element from its siblings within an interactive division. This is the name of the field use when data is submitted back to the server.
rend - (May be null) a rendering hint used to override the default display of the element.
Throws:
WingException
Method Detail

setMultiple

public void setMultiple()
Enable the user to select multiple options.


setMultiple

public void setMultiple(boolean multiple)
Set whether the user is able to select multiple options.

Parameters:
multiple - (Required) The multiple state.

setSize

public void setSize(int size)
Set the number of options visible at any one time.

Parameters:
size - (Required) The number of options to display.

setEvtBehavior

public void setEvtBehavior(String behavior)
Set the event behavior attribute of the select item

Parameters:
action - javascript to instantiate on @evtbehavior

enableAddOperation

public void enableAddOperation()
                        throws WingException
Enable the add operation for this field. When this is enabled the front end will add a button to add more items to the field.

Throws:
WingException

enableDeleteOperation

public void enableDeleteOperation()
                           throws WingException
Enable the delete operation for this field. When this is enabled then the front end will provide a way for the user to select fields (probably checkboxes) along with a submit button to delete the selected fields.

Throws:
WingException

addOption

public Option addOption(String returnValue)
                 throws WingException
Add a select option.

Parameters:
returnValue - (Required) The value to be passed back if this option is selected.
Throws:
WingException

addOption

public Option addOption(boolean selected,
                        String returnValue)
                 throws WingException
Add a select option.

Parameters:
selected - (Required) Set the field as selected.
returnValue - (Required) The value to be passed back if this option is selected.
Throws:
WingException

addOption

public void addOption(String returnValue,
                      String characters)
               throws WingException
Add a select option.

Parameters:
returnValue - (Required) The value to be passed back if this option is selected.
characters - (Required) The text to set as the visible option.
Throws:
WingException

addOption

public void addOption(boolean selected,
                      String returnValue,
                      String characters)
               throws WingException
Add a select option.

Parameters:
selected - (Required) Set the field as selected.
returnValue - (Required) The value to be passed back if this option is selected.
characters - (Required) The text to set as the visible option.
Throws:
WingException

addOption

public void addOption(int returnValue,
                      String characters)
               throws WingException
Add a select option.

Parameters:
returnValue - (Required) The value to be passed back if this option is selected.
characters - (Required) The text to set as the visible option.
Throws:
WingException

addOption

public void addOption(boolean selected,
                      int returnValue,
                      String characters)
               throws WingException
Add a select option.

Parameters:
selected - (Required) Set the field as selected.
returnValue - (Required) The value to be passed back if this option is selected.
characters - (Required) The text to set as the visible option.
Throws:
WingException

addOption

public void addOption(String returnValue,
                      Message message)
               throws WingException
Add a select option.

Parameters:
returnValue - (Required) The value to be passed back if this option is selected.
message - (Required) The transalted text to set as the visible option.
Throws:
WingException

addOption

public void addOption(boolean selected,
                      String returnValue,
                      Message message)
               throws WingException
Add a select option.

Parameters:
selected - (Required) Set the field as selected.
returnValue - (Required) The value to be passed back if this option is selected.
message - (Required) The transalted text to set as the visible option.
Throws:
WingException

addOption

public void addOption(int returnValue,
                      Message message)
               throws WingException
Add a select option.

Parameters:
returnValue - (Required) The value to be passed back if this option is selected.
message - (Required) The transalted text to set as the visible option.
Throws:
WingException

addOption

public void addOption(boolean selected,
                      int returnValue,
                      Message message)
               throws WingException
Add a select option.

Parameters:
selected - (Required) Set the field as selected.
returnValue - (Required) The value to be passed back if this option is selected.
message - (Required) The transalted text to set as the visible option.
Throws:
WingException

setOptionSelected

public void setOptionSelected(String returnValue)
                       throws WingException
Set the given option as selected.

Parameters:
returnValue - (Required) The return value of the option to be selected.
Throws:
WingException

setOptionSelected

public void setOptionSelected(int returnValue)
                       throws WingException
Set the given option as selected.

Parameters:
returnValue - (Required) The return value of the option to be selected.
Throws:
WingException

addInstance

public Instance addInstance()
                     throws WingException
Add a field instance

Returns:
instance
Throws:
WingException


Copyright © 2012 DuraSpace. All Rights Reserved.