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

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

public class Params
extends AbstractWingElement
implements StructuralElement


Field Summary
static String A_AUTHORITY_CONTROLLED
          True if this field is authority-controlled
static String A_AUTHORITY_REQUIRED
          True if an authority value is required
static String A_AUTOFOCUS
          The name of the HTML5 autofocus field
static String A_CHOICES
          The name of the field to use for a list of choices
static String A_CHOICES_CLOSED
          The name of the field to use for a list of choices
static String A_CHOICES_PRESENTATION
          See PRESENTATION_*
static String A_COLS
          The name of the cols attribute
static String A_EVTBEHAVIOR
          The name of the behavior attribute
static String A_MAX_LENGTH
          The name of the max length attribute
static String A_MULTIPLE
          The name of the multiple attribute
static String A_OPERATIONS
          The name of the operations attribute
static String A_RETURN_VALUE
          The name of the return value attribute
static String A_ROWS
          The name of the rows attribute
static String A_SIZE
          The name of the size attribute
protected  boolean addOperation
          The supported operations for this field
protected  boolean authority
          Value of the AuthorityControlled attribute
protected  boolean authority_required
          Value of the Authority_Required attribute
protected  String autofocus
          Value of the HTML5 autofocus field
protected  String choices
          Value of the Choices attribute
protected  boolean choicesClosed
          Value of choicesClosed option
protected  int cols
          The number of cols the field should span
protected  boolean deleteOperation
           
static String E_PARAMS
          The name of the params element
protected  String evtBehavior
          The event behavior attribute such as onchange, onfocus, on...
protected  int maxlength
          The maximum length of the field
protected  boolean multiple
          Whether multiple values for this field are allowed
static String OPERATION_ADD
          Possible operations
static String OPERATION_DELETE
           
static String[] OPERATIONS
           
protected  String presentation
          Value of the Choices Presentation attribute
static String PRESENTATION_LOOKUP
           
static String PRESENTATION_NONE
           
static String PRESENTATION_SELECT
          Possible UI presentation values
static String PRESENTATION_SUGGEST
           
static String[] PRESENTATIONS
           
protected  String returnValue
          The return value for the field, checkboxes and radio buttons.
protected  int rows
          The number of rows the field should span
protected  int size
          The field size
 
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 Params(WingContext context)
          Construct a new parameter's element
 
Method Summary
 void enableAddOperation()
          Enable the add operation for this field set.
 void enableDeleteOperation()
          Enable the delete operation for this field set.
 void setAuthorityControlled()
          Set this field to be authority-controlled.
 void setAuthorityControlled(boolean value)
          Set this field to be authority-controlled.
 void setAuthorityRequired()
          Set this field as authority_required.
 void setAuthorityRequired(boolean value)
          Set this field to either be required or not required as determined by the required parameter.
 void setAutofocus(String value)
          Set the field's autofocus attribute, an HTML5 feature.
 void setChoices(String fieldKey)
           
 void setChoicesClosed()
          Sets whether choices are "closed" to the set returned by plugin.
 void setChoicesClosed(boolean value)
          Sets whether choices are "closed" to the set returned by plugin.
 void setChoicesPresentation(String value)
          Set the kind of UI presentation requested for this choice, e.g.
 void setCols(int cols)
          Set the number of columns of this field.
 void setEvtBehavior(String behavior)
          Set the event behavior (e.g.
 void setMaxLength(int maxlength)
          Set the maximum length of the field.
 void setMultiple(boolean multiple)
          Determine if this field can accept multiple values.
 void setReturnValue(String returnValue)
          The returned value for this field if it is checked (or selected).
 void setRows(int rows)
          Set the number of rows of this field.
 void setSize(int size)
          Set the size of the field.
 void toSAX(ContentHandler contentHandler, LexicalHandler lexicalHandler, NamespaceSupport namespaces)
          Translate this element and all contained elements into SAX events.
 
Methods inherited from class org.dspace.app.xmlui.wing.element.AbstractWingElement
dispose, 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
 

Field Detail

E_PARAMS

public static final String E_PARAMS
The name of the params element

See Also:
Constant Field Values

A_OPERATIONS

public static final String A_OPERATIONS
The name of the operations attribute

See Also:
Constant Field Values

A_RETURN_VALUE

public static final String A_RETURN_VALUE
The name of the return value attribute

See Also:
Constant Field Values

A_SIZE

public static final String A_SIZE
The name of the size attribute

See Also:
Constant Field Values

A_EVTBEHAVIOR

public static final String A_EVTBEHAVIOR
The name of the behavior attribute

See Also:
Constant Field Values

A_MAX_LENGTH

public static final String A_MAX_LENGTH
The name of the max length attribute

See Also:
Constant Field Values

A_MULTIPLE

public static final String A_MULTIPLE
The name of the multiple attribute

See Also:
Constant Field Values

A_ROWS

public static final String A_ROWS
The name of the rows attribute

See Also:
Constant Field Values

A_COLS

public static final String A_COLS
The name of the cols attribute

See Also:
Constant Field Values

A_AUTHORITY_CONTROLLED

public static final String A_AUTHORITY_CONTROLLED
True if this field is authority-controlled

See Also:
Constant Field Values

A_AUTHORITY_REQUIRED

public static final String A_AUTHORITY_REQUIRED
True if an authority value is required

See Also:
Constant Field Values

A_AUTOFOCUS

public static final String A_AUTOFOCUS
The name of the HTML5 autofocus field

See Also:
Constant Field Values

A_CHOICES

public static final String A_CHOICES
The name of the field to use for a list of choices

See Also:
Constant Field Values

A_CHOICES_PRESENTATION

public static final String A_CHOICES_PRESENTATION
See PRESENTATION_*

See Also:
Constant Field Values

A_CHOICES_CLOSED

public static final String A_CHOICES_CLOSED
The name of the field to use for a list of choices

See Also:
Constant Field Values

OPERATION_ADD

public static final String OPERATION_ADD
Possible operations

See Also:
Constant Field Values

OPERATION_DELETE

public static final String OPERATION_DELETE
See Also:
Constant Field Values

OPERATIONS

public static final String[] OPERATIONS

PRESENTATION_SELECT

public static final String PRESENTATION_SELECT
Possible UI presentation values

See Also:
Constant Field Values

PRESENTATION_SUGGEST

public static final String PRESENTATION_SUGGEST
See Also:
Constant Field Values

PRESENTATION_LOOKUP

public static final String PRESENTATION_LOOKUP
See Also:
Constant Field Values

PRESENTATION_NONE

public static final String PRESENTATION_NONE
See Also:
Constant Field Values

PRESENTATIONS

public static final String[] PRESENTATIONS

addOperation

protected boolean addOperation
The supported operations for this field


deleteOperation

protected boolean deleteOperation

returnValue

protected String returnValue
The return value for the field, checkboxes and radio buttons.


size

protected int size
The field size


evtBehavior

protected String evtBehavior
The event behavior attribute such as onchange, onfocus, on...


maxlength

protected int maxlength
The maximum length of the field


multiple

protected boolean multiple
Whether multiple values for this field are allowed


rows

protected int rows
The number of rows the field should span


cols

protected int cols
The number of cols the field should span


authority

protected boolean authority
Value of the AuthorityControlled attribute


authority_required

protected boolean authority_required
Value of the Authority_Required attribute


autofocus

protected String autofocus
Value of the HTML5 autofocus field


choices

protected String choices
Value of the Choices attribute


presentation

protected String presentation
Value of the Choices Presentation attribute


choicesClosed

protected boolean choicesClosed
Value of choicesClosed option

Constructor Detail

Params

protected Params(WingContext context)
          throws WingException
Construct a new parameter's element

Parameters:
context - (Required) The context this element is contained in, such as where to route SAX events and what i18n catalogue to use.
Throws:
WingException
Method Detail

enableAddOperation

public void enableAddOperation()
                        throws WingException
Enable the add operation for this field set. 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 set. 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

setSize

public void setSize(int size)
Set the size of the field. This applies to text, password, and select fields.

Parameters:
size - (Required) The size of the field.

setEvtBehavior

public void setEvtBehavior(String behavior)
Set the event behavior (e.g. a javascript event) of the field. This applies to select fields as of this writing.

Parameters:
behavior - The action on onchange of the field.

setMaxLength

public void setMaxLength(int maxlength)
Set the maximum length of the field. This applies to text, password, and textarea fields.

Parameters:
maxlength - (Required) The maximum length of the field.

setRows

public void setRows(int rows)
Set the number of rows of this field. The applies only to textarea fields.

Parameters:
rows - (Required) The number of rows.

setCols

public void setCols(int cols)
Set the number of columns of this field. The applies only to textarea fields.

Parameters:
cols - (Required) The number of columns.

setReturnValue

public void setReturnValue(String returnValue)
The returned value for this field if it is checked (or selected). The applies to radio and checkbox fields.

Parameters:
returnValue - (Required) The value to be returned if this field is checked.

setMultiple

public void setMultiple(boolean multiple)
Determine if this field can accept multiple values. The applies only to select fields.

Parameters:
multiple - (Required) whether the field can accept multiple values.

setAuthorityControlled

public void setAuthorityControlled()
Set this field to be authority-controlled.


setAuthorityControlled

public void setAuthorityControlled(boolean value)
Set this field to be authority-controlled.

Parameters:
value - true if authority-controlled.

setAuthorityRequired

public void setAuthorityRequired()
Set this field as authority_required.


setAuthorityRequired

public void setAuthorityRequired(boolean value)
Set this field to either be required or not required as determined by the required parameter.

Parameters:
value - Determine if the authority control is required or not on this field.

setAutofocus

public void setAutofocus(String value)
Set the field's autofocus attribute, an HTML5 feature. Valid input values to enable autofocus are: autofocus, and empty string.

Parameters:
value -

setChoices

public void setChoices(String fieldKey)
Parameters:
fieldKey - pre-determined metadata field key

setChoicesPresentation

public void setChoicesPresentation(String value)
                            throws WingException
Set the kind of UI presentation requested for this choice, e.g. select vs. suggest. Value must match one of the PRESENTATIONS.

Parameters:
value - pre-determined metadata field key
Throws:
WingException

setChoicesClosed

public void setChoicesClosed(boolean value)
Sets whether choices are "closed" to the set returned by plugin.

Parameters:
value - pre-determined metadata field key

setChoicesClosed

public void setChoicesClosed()
Sets whether choices are "closed" to the set returned by plugin.


toSAX

public void toSAX(ContentHandler contentHandler,
                  LexicalHandler lexicalHandler,
                  NamespaceSupport namespaces)
           throws SAXException
Translate this element and all contained elements into SAX events. The events should be routed to the contentHandler found in the WingContext.

Specified by:
toSAX in interface WingElement
Parameters:
contentHandler - (Required) The registered contentHandler where SAX events should be routed too.
lexicalHandler - (Required) The registered lexicalHandler where lexical events (such as CDATA, DTD, etc) should be routed too.
namespaces - (Required) SAX Helper class to keep track of namespaces able to determine the correct prefix for a given namespace URI.
Throws:
SAXException


Copyright © 2012 DuraSpace. All Rights Reserved.