|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.app.xmlui.wing.element.AbstractWingElement
org.dspace.app.xmlui.wing.element.Field
public abstract class Field
| Field Summary | |
|---|---|
static String |
A_DISABLED
The name of the disabled attribute |
static String |
A_FIELD_TYPE
The name of the field type attribute |
static String |
A_REQUIRED
The name of the required attribute |
protected boolean |
disabled
Whether this field is disabled |
static String |
E_FIELD
The name of the field element |
protected List<Error> |
errors
Error instructions for this field |
protected List<Field> |
fields
All sub fields contained within a composite field |
protected Help |
help
Help instructions for this field |
protected List<Instance> |
instances
The set of stored values |
protected Label |
label
The fields Label |
protected String |
name
The field's name |
static String |
OPERATION_ADD
Possible field behavioral operations |
static String |
OPERATION_DELETE
|
static String[] |
OPERATIONS
|
protected List<Option> |
options
The value of this field |
protected Params |
params
Additional field parameters |
protected String |
rend
Any special rendering instructions |
protected boolean |
required
Whether this field is required |
protected String |
type
The type of field, see TYPES above |
static String |
TYPE_BUTTON
The possible field types |
static String |
TYPE_CHECKBOX
|
static String |
TYPE_COMPOSITE
|
static String |
TYPE_FILE
|
static String |
TYPE_HIDDEN
|
static String |
TYPE_PASSWORD
|
static String |
TYPE_RADIO
|
static String |
TYPE_SELECT
|
static String |
TYPE_TEXT
|
static String |
TYPE_TEXTAREA
|
static String[] |
TYPES
All the possible field types collected into one array. |
protected List<Value> |
values
The value of this field |
| 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 |
Field(WingContext context,
String name,
String type,
String rend)
Construct a new field. |
| Method Summary | |
|---|---|
Error |
addError()
The error elements denotes that the fields value is invalid for the given context. |
void |
addError(Message message)
The error elements denotes that the fields value is invalid for the given context. |
void |
addError(String characters)
The error elements denotes that the fields value is invalid for the given context. |
void |
dispose()
Dispose |
protected void |
removeValueOfType(String removeType)
Private function to remove all values of a particular type. |
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)
Declare that this field has a value to be chosen from a choice provider (see ChoicesManager). |
void |
setChoicesClosed()
|
void |
setChoicesClosed(boolean value)
Set whether set of choices is "closed" to just the values in menu, or allows arbitrary user-supplied values. |
void |
setChoicesPresentation(String value)
Set the kind of UI presentation requested for this choice, e.g. |
void |
setDisabled()
Set this field to be disabled. |
void |
setDisabled(boolean disabled)
Set this field to either be disabled or enabled as determined by the disabled parameter. |
Help |
setHelp()
The help element provides help instructions to assist the user in using this field. |
void |
setHelp(Message message)
The help element provides help instructions to assist the user in using this field. |
void |
setHelp(String characters)
The help element provides help instructions to assist the user in using this field. |
Label |
setLabel()
The help element provides help instructions to assist the user in using this field. |
void |
setLabel(Message message)
The help element provides help instructions to assist the user in using this field. |
void |
setLabel(String characters)
The help element provides help instructions to assist the user in using this field. |
void |
setRequired()
Set this field as required. |
void |
setRequired(boolean required)
Set this field to either be required or not required as determined by the required parameter. |
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 |
|---|
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 |
|---|
public static final String E_FIELD
public static final String A_FIELD_TYPE
public static final String A_DISABLED
public static final String A_REQUIRED
public static final String TYPE_BUTTON
public static final String TYPE_CHECKBOX
public static final String TYPE_FILE
public static final String TYPE_HIDDEN
public static final String TYPE_PASSWORD
public static final String TYPE_RADIO
public static final String TYPE_SELECT
public static final String TYPE_TEXT
public static final String TYPE_TEXTAREA
public static final String TYPE_COMPOSITE
public static final String[] TYPES
public static final String OPERATION_ADD
public static final String OPERATION_DELETE
public static final String[] OPERATIONS
protected String name
protected String type
protected boolean disabled
protected boolean required
protected String rend
protected Params params
protected Label label
protected Help help
protected List<Error> errors
protected List<Field> fields
protected List<Option> options
protected List<Value> values
protected List<Instance> instances
| Constructor Detail |
|---|
protected Field(WingContext context,
String name,
String type,
String rend)
throws WingException
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.type - (Required) Specify the type of field, must be one of the field
types defined in the static variable TYPES.rend - (May be null) a rendering hint used to override the default
display of the element.
WingException| Method Detail |
|---|
public void setRequired()
public void setRequired(boolean required)
required - Determine if the field is required or not.public void setDisabled()
public void setDisabled(boolean disabled)
disabled - Determine if the field is required or not.public void setAuthorityControlled()
public void setAuthorityControlled(boolean value)
value - true if field is authority-controlled.public void setAuthorityRequired()
public void setAuthorityRequired(boolean value)
value - Determine if the authority control is required or not on this field.public void setAutofocus(String value)
value - To enable autofocus: "autofocus" or ""public void setChoices(String fieldKey)
fieldKey - pre-determined metadata field key
public void setChoicesPresentation(String value)
throws WingException
value - pre-determined metadata field key
WingExceptionpublic void setChoicesClosed(boolean value)
value - true if it is closedpublic void setChoicesClosed()
public Help setHelp()
throws WingException
WingException
public void setHelp(String characters)
throws WingException
characters - (May be null) Direct content or a dictionary tag to be
inserted into the element.
WingException
public void setHelp(Message message)
throws WingException
message - (Required) A key into the i18n catalogue for translation into
the user's preferred language.
WingException
public Error addError()
throws WingException
WingException
public void addError(String characters)
throws WingException
characters - (May be null) Direct content or a dictionary tag to be
inserted into the element.
WingException
public void addError(Message message)
throws WingException
message - (Required) A key into the i18n catalogue for translation into
the user's preferred language.
WingException
public Label setLabel()
throws WingException
WingException
public void setLabel(String characters)
throws WingException
characters - (May be null) Direct content or a dictionary tag to be
inserted into the element.
WingException
public void setLabel(Message message)
throws WingException
message - (Required) A key into the i18n catalogue for translation into
the user's preferred language.
WingExceptionprotected void removeValueOfType(String removeType)
removeType - The type to be removed.
public void toSAX(ContentHandler contentHandler,
LexicalHandler lexicalHandler,
NamespaceSupport namespaces)
throws SAXException
toSAX in interface WingElementcontentHandler - (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.
SAXExceptionpublic void dispose()
dispose in interface WingElementdispose in class AbstractWingElement
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||