public class FormElement extends java.lang.Object implements XMLable, JSONCacheable, DeepCloneable, java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
FormElement.FormElementType |
static interface |
FormElement.InferFormElementCallback |
Modifier and Type | Field and Description |
---|---|
static int |
ELEMENT_TYPE_BUTTON
Constant for element type Button
|
static int |
ELEMENT_TYPE_CHECKBOX
Constant for element type Checkbox
|
static int |
ELEMENT_TYPE_COMMUNITY_PICKER
Constant for element type Community Picker
|
static int |
ELEMENT_TYPE_CONTENT_PICKER
Constant for element type Content Picker
|
static int |
ELEMENT_TYPE_DATE
Constant for element type Date
|
static int |
ELEMENT_TYPE_DATETIME
Constant for element type Date Time
|
static int |
ELEMENT_TYPE_DOC_PICKER
Constant for element type Document Picker
|
static int |
ELEMENT_TYPE_DOUBLE
Constant for element type Double
|
static int |
ELEMENT_TYPE_DROPDOWN
Constant for element type Dropdown
|
static int |
ELEMENT_TYPE_EMAIL_ADDRESS
Constant for element of type Email Recipient
|
static int |
ELEMENT_TYPE_EMAIL_RECIPIENT_PICKER
Constant for element of type Email Recipient
|
static int |
ELEMENT_TYPE_FOLDER_PICKER
Constant for element type Folder Picker
|
static int |
ELEMENT_TYPE_FORM
Constant for layout of type Form
|
static int |
ELEMENT_TYPE_FORUM_PICKER
Constant for element type Forum Picker
|
static int |
ELEMENT_TYPE_GROUP_PICKER
Constant for element type Group Picker
|
static int |
ELEMENT_TYPE_HIDDEN
Constant for element type Hidden
|
static int |
ELEMENT_TYPE_HTMLAREA
Constant for element type HTML Area
|
static int |
ELEMENT_TYPE_KC_PICKER
Constant for element type KC Picker
|
static int |
ELEMENT_TYPE_LABEL
Constant for element type Label
|
static int |
ELEMENT_TYPE_LOCAL_FILE
Constant for element type Local File
|
static int |
ELEMENT_TYPE_LONG
Constant for element type Long
|
static int |
ELEMENT_TYPE_MESSAGE_PICKER
Constant for element type Message Picker
|
static int |
ELEMENT_TYPE_PAGE_PICKER
Constant for element type Page Picker
|
static int |
ELEMENT_TYPE_PARAGRAPHS
Constant for element of type Paragraphs
|
static int |
ELEMENT_TYPE_PASSWORD
Constant for element type Password
|
static int |
ELEMENT_TYPE_PEOPLE_PICKER
Constant for element type People Picker
|
static int |
ELEMENT_TYPE_PROCESS_MODEL_PICKER
Constant for element of type Process Model
|
static int |
ELEMENT_TYPE_PROCESS_PICKER
Constant for element of type Process
|
static int |
ELEMENT_TYPE_RADIO
Constant for element type Radio
|
static int |
ELEMENT_TYPE_TABS
Constant for layout of type Tabs
|
static int |
ELEMENT_TYPE_TEXT
Constant for element type Text
|
static int |
ELEMENT_TYPE_TEXTAREA
Constant for element type Text Area
|
static int |
ELEMENT_TYPE_THREAD_PICKER
Constant for element type Thread Picker
|
static int |
ELEMENT_TYPE_TIME
Constant for element type Time
|
static int |
ELEMENT_TYPE_USER_PICKER
Constant for element type User Picker
|
protected static Logger |
LOG |
DEFAULT_BUFFER_SIZE
hiddenAttributes$TRANSIENT
Constructor and Description |
---|
FormElement() |
Modifier and Type | Method and Description |
---|---|
int |
addExpression(TypedVariable expression_) |
java.lang.Object |
clone()
Clone this object.
|
static FormElement |
fromXML(org.w3c.dom.Node feNode)
Creates a form element from xml
|
static FormElement |
fromXML(org.w3c.dom.Node feNode,
FormElement.InferFormElementCallback callback) |
TypedVariable |
getExpression(int index_) |
int |
getExpressionCount() |
TypedVariable[] |
getExpressions()
Returns a
TypedVariable[] of expressions. |
java.lang.String |
getExtra()
Gets the JSON representation of the FE this bean represents.
|
boolean |
getHidden()
Get if the form element is hidden
|
java.util.HashSet |
getHiddenAttributes()
Returns the set of attributes (properties) that should not be included in
the JSON representation of the object.
|
java.lang.String |
getInstructions()
Gets the instructions for the form element
|
java.lang.String |
getLabel()
Gets the label for the form element
|
java.lang.String |
getMappedTo()
Get the acp or process parameter the form element is
mapped to
|
int |
getMappedToArrayIndex()
If the form element is mapped to a bean array, gets the index in the bean
array the form element is mapped to
|
java.lang.String |
getMappedToBeanArray()
If the mappedTo is a bean array, gets the bean array that the
form element is mapped to
|
boolean |
getMultiple()
Gets if the form element allows multiple entries
|
boolean |
getMutable()
Gets whether the form element is mutable
|
java.lang.String |
getName()
Gets the name
|
Option[] |
getOptions()
Gets the form element options
|
java.lang.String |
getPickerType()
Determines the pickerType to be used as the picker for this element.
|
boolean |
getRequired()
Gets if the form element is required
|
int |
getType()
Gets the form element type
|
java.lang.String |
getTypeName()
Determines the name of the type of input widget that should be used to
render this element based on the _type property.
|
java.lang.String |
getValue()
Gets the value
|
boolean |
isBooleanType() |
boolean |
isTypeWithOptions()
Whether the form element type has options
|
void |
setExpressions(TypedVariable[] expressions_)
Sets a
TypedVariable[] of expressions. |
void |
setExtra(java.lang.String extra_)
Sets the JSON representation of the FE this bean represents.
|
void |
setHidden(boolean hidden_)
Sets if the form element is hidden
|
void |
setInstructions(java.lang.String instructions_)
Sets the instructions for the form element
|
void |
setLabel(java.lang.String label_)
Sets the label for the form element
|
void |
setMappedTo(java.lang.String mappedTo_)
Sets what the acp or process parameter the form element
is mapped to
|
void |
setMappedToArrayIndex(int mappedToArrayIndex_)
Sets the index in a bean array that the form element is mapped to
|
void |
setMappedToBeanArray(java.lang.String mappedToBeanArray_)
Sets the bean array that the form element is mapped to
|
void |
setMultiple(boolean multiple_)
Sets if the form element allows multiple entries
|
void |
setMutable(boolean mutable_)
Sets whether the form element is mutable
|
void |
setName(java.lang.String name_)
Sets the name
|
void |
setOptions(Option[] options_)
Sets the form element options
|
void |
setRequired(boolean required_)
Sets if the form element is required
|
void |
setType(int type_)
Sets the form element type
|
void |
setValue(java.lang.String value_)
Sets the value
|
java.lang.String |
toString() |
java.lang.String |
toXML()
Converts the form element to xml
|
void |
toXML(java.lang.StringBuilder buffer_)
Converts the form element to xml
|
protected static final Logger LOG
public static final int ELEMENT_TYPE_LONG
public static final int ELEMENT_TYPE_DOUBLE
public static final int ELEMENT_TYPE_TEXT
public static final int ELEMENT_TYPE_TEXTAREA
public static final int ELEMENT_TYPE_USER_PICKER
public static final int ELEMENT_TYPE_GROUP_PICKER
public static final int ELEMENT_TYPE_PEOPLE_PICKER
public static final int ELEMENT_TYPE_DATE
public static final int ELEMENT_TYPE_TIME
public static final int ELEMENT_TYPE_DATETIME
public static final int ELEMENT_TYPE_KC_PICKER
public static final int ELEMENT_TYPE_FOLDER_PICKER
public static final int ELEMENT_TYPE_DOC_PICKER
public static final int ELEMENT_TYPE_COMMUNITY_PICKER
public static final int ELEMENT_TYPE_RADIO
public static final int ELEMENT_TYPE_CHECKBOX
public static final int ELEMENT_TYPE_DROPDOWN
public static final int ELEMENT_TYPE_LABEL
public static final int ELEMENT_TYPE_FORUM_PICKER
public static final int ELEMENT_TYPE_THREAD_PICKER
public static final int ELEMENT_TYPE_MESSAGE_PICKER
public static final int ELEMENT_TYPE_LOCAL_FILE
public static final int ELEMENT_TYPE_HIDDEN
public static final int ELEMENT_TYPE_CONTENT_PICKER
public static final int ELEMENT_TYPE_PAGE_PICKER
public static final int ELEMENT_TYPE_HTMLAREA
public static final int ELEMENT_TYPE_BUTTON
public static final int ELEMENT_TYPE_PASSWORD
public static final int ELEMENT_TYPE_PARAGRAPHS
public static final int ELEMENT_TYPE_EMAIL_ADDRESS
public static final int ELEMENT_TYPE_EMAIL_RECIPIENT_PICKER
public static final int ELEMENT_TYPE_FORM
public static final int ELEMENT_TYPE_TABS
public static final int ELEMENT_TYPE_PROCESS_MODEL_PICKER
public static final int ELEMENT_TYPE_PROCESS_PICKER
public java.util.HashSet getHiddenAttributes()
JSONable
getHiddenAttributes
in interface JSONable
public java.lang.Object clone()
clone
in interface DeepCloneable
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public boolean getHidden()
public void setHidden(boolean hidden_)
hidden_
- whether or not the form element is to be hiddengetHidden()
public java.lang.String getInstructions()
public void setInstructions(java.lang.String instructions_)
instructions_
- the instructions to setgetInstructions()
public java.lang.String getLabel()
public void setLabel(java.lang.String label_)
label_
- the label to setgetLabel()
public java.lang.String getMappedTo()
public void setMappedTo(java.lang.String mappedTo_)
mappedTo_
- what to set the form element
mapping togetMappedTo()
public boolean getMultiple()
public void setMultiple(boolean multiple_)
multiple_
- multiple entry allowance to setgetMultiple()
public boolean getMutable()
public void setMutable(boolean mutable_)
mutable_
- mutable entry allowance to setgetMutable()
public java.lang.String getName()
public void setName(java.lang.String name_)
name_
- the namegetName()
public Option[] getOptions()
Option
objectspublic void setOptions(Option[] options_)
options_
- the options to set for the form elementgetOptions()
public int getType()
ELEMENT_TYPE_XXX
in this file for types.public void setType(int type_)
type_
- the type to setgetType()
public boolean getRequired()
public void setRequired(boolean required_)
required_
- the entry requirements to setgetRequired()
public java.lang.String getValue()
public void setValue(java.lang.String value_)
value_
- the value to setgetValue()
public java.lang.String toXML()
public void toXML(java.lang.StringBuilder buffer_)
public static FormElement fromXML(org.w3c.dom.Node feNode)
feNode
- the xml to create a form element fromFormElement
public static FormElement fromXML(org.w3c.dom.Node feNode, FormElement.InferFormElementCallback callback)
public int getMappedToArrayIndex()
public void setMappedToArrayIndex(int mappedToArrayIndex_)
mappedToArrayIndex_
- the index in the bean array to map the
form element topublic java.lang.String getMappedToBeanArray()
public void setMappedToBeanArray(java.lang.String mappedToBeanArray_)
mappedToBeanArray_
- the bean array to set the mappedTo for
the form elementpublic java.lang.String getTypeName()
public java.lang.String getPickerType()
public boolean isTypeWithOptions()
public java.lang.String getExtra()
String
data in JSON formatpublic void setExtra(java.lang.String extra_)
extra_
- A String
in JSON format which describes the
FE this bean represents.getExtra()
public TypedVariable[] getExpressions()
TypedVariable[]
of expressions. Any expression stored in a new
field (in the extra
field) is extracted from the JSON String
and put in this array.getExtra()
public void setExpressions(TypedVariable[] expressions_)
TypedVariable[]
of expressions. This should never be
overwritten manually.getExpressions()
public int addExpression(TypedVariable expression_)
public TypedVariable getExpression(int index_)
public int getExpressionCount()
public boolean isBooleanType()
Copyright © 2003-2024 Appian Corporation. All Rights Reserved.