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

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.Composite
All Implemented Interfaces:
StructuralElement, WingElement

public class Composite
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 Composite(WingContext context, String name, String rend)
          Construct a new field.
 
Method Summary
 CheckBox addCheckBox(String name)
          Add a boolean input control which may be toggled by the user.
 CheckBox addCheckBox(String name, String rend)
          Add a boolean input control which may be toggled by the user.
 Instance addInstance()
          Add a field instance
 Radio addRadio(String name)
          Add a boolean input control which may be toggled by the user.
 Radio addRadio(String name, String rend)
          Add a boolean input control which may be toggled by the user.
 Select addSelect(String name)
          Add a menu input control which allows the user to select from a list of available options.
 Select addSelect(String name, String rend)
          Add a menu input control which allows the user to select from a list of available options.
 Text addText(String name)
          Add a single-line text input control.
 Text addText(String name, String rend)
          Add a single-line text input control.
 TextArea addTextArea(String name)
          Add a multi-line text input control.
 TextArea addTextArea(String name, String rend)
          Add a multi-line text input control.
 void enableAddOperation()
          Enable the add operation for this field.
 void enableDeleteOperation()
          Enable the delete operation for this field.
 
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

Composite

protected Composite(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

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

addCheckBox

public CheckBox addCheckBox(String name,
                            String rend)
                     throws WingException
Add a boolean input control which may be toggled by the user. A checkbox may have several fields which share the same name and each of those fields may be toggled independently. This is distinct from a radio button where only one field may be toggled.

Parameters:
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.
Returns:
a new checkbox field
Throws:
WingException

addCheckBox

public CheckBox addCheckBox(String name)
                     throws WingException
Add a boolean input control which may be toggled by the user. A checkbox may have several fields which share the same name and each of those fields may be toggled independently. This is distinct from a radio button where only one field may be toggled.

Parameters:
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.
Returns:
A new checkbox field
Throws:
WingException

addRadio

public Radio addRadio(String name,
                      String rend)
               throws WingException
Add a boolean input control which may be toggled by the user. Multiple radio button fields may share the same name. When this occurs only one field may be selected to be true. This is distinct from a checkbox where multiple fields may be toggled.

Parameters:
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.
Returns:
a new radio field.
Throws:
WingException

addRadio

public Radio addRadio(String name)
               throws WingException
Add a boolean input control which may be toggled by the user. Multiple radio button fields may share the same name. When this occurs only one field may be selected to be true. This is distinct from a checkbox where multiple fields may be toggled.

Parameters:
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.
Returns:
a new radio field
Throws:
WingException

addSelect

public Select addSelect(String name,
                        String rend)
                 throws WingException
Add a menu input control which allows the user to select from a list of available options.

Parameters:
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.
Returns:
a new select field
Throws:
WingException

addSelect

public Select addSelect(String name)
                 throws WingException
Add a menu input control which allows the user to select from a list of available options.

Parameters:
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.
Returns:
a new select field
Throws:
WingException

addText

public Text addText(String name,
                    String rend)
             throws WingException
Add a single-line text input control.

Parameters:
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.
Returns:
A new text field
Throws:
WingException

addText

public Text addText(String name)
             throws WingException
Add a single-line text input control.

Parameters:
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.
Returns:
a new text field
Throws:
WingException

addTextArea

public TextArea addTextArea(String name,
                            String rend)
                     throws WingException
Add a multi-line text input control.

Parameters:
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.
Returns:
a new text area field
Throws:
WingException

addTextArea

public TextArea addTextArea(String name)
                     throws WingException
Add a multi-line text input control.

Parameters:
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.
Returns:
a new text area field
Throws:
WingException

addInstance

public Instance addInstance()
                     throws WingException
Add a field instance

Returns:
instance
Throws:
WingException


Copyright © 2012 DuraSpace. All Rights Reserved.