Package com.uc4.api
Class FormItemLabel
- java.lang.Object
-
- com.uc4.api.AbstractFormItem
-
- com.uc4.api.FormItemLabel
-
- All Implemented Interfaces:
IFormItem
public class FormItemLabel extends AbstractFormItem
This class represents a label in aForm
.
-
-
Constructor Summary
Constructors Constructor Description FormItemLabel(org.w3c.dom.Element element)
Constructs aFormItemLabel
from the specified XML element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getId()
ID has to be null for labelsjava.lang.String
getValue()
Returns the current value.boolean
isLabel()
Returnstrue
if this form item is a label.boolean
isRequired()
Returnstrue
if an input is required.void
setValue(java.lang.String value)
Sets a new value for this field.-
Methods inherited from class com.uc4.api.AbstractFormItem
getLabel, isFixed, isList, isNewLine, isNumber, isText, isUppercase, isValid
-
-
-
-
Method Detail
-
isLabel
public boolean isLabel()
Description copied from interface:IFormItem
Returnstrue
if this form item is a label.- Specified by:
isLabel
in interfaceIFormItem
- Overrides:
isLabel
in classAbstractFormItem
- Returns:
- Boolean indicating if this item is label
-
setValue
public void setValue(java.lang.String value)
Description copied from interface:IFormItem
Sets a new value for this field. This method can throw an exception if the input is not valid.- Parameters:
value
- New value
-
getValue
public java.lang.String getValue()
Description copied from interface:IFormItem
Returns the current value. If a default value is set this method can be used to read the default value.- Returns:
- Value of this field
-
isRequired
public boolean isRequired()
Description copied from interface:IFormItem
Returnstrue
if an input is required. In this case the value cannot be an emptyString
.- Specified by:
isRequired
in interfaceIFormItem
- Overrides:
isRequired
in classAbstractFormItem
- Returns:
- Boolean indicating if a value is required to process the form
-
getId
public java.lang.String getId()
ID has to be null for labels- Specified by:
getId
in interfaceIFormItem
- Overrides:
getId
in classAbstractFormItem
- Returns:
- String representing the ID
-
-