Package | org.igniterealtime.xiff.data.forms |
Class | public class FormField |
Inheritance | FormField ![]() ![]() |
Implements | ISerializable |
See also
Property | Defined by | ||
---|---|---|---|
![]() | _exts : Object | ExtensionContainer | |
label : String
The label of this field used by user interfaces to render a descriptive
title of this field
| FormField | ||
name : String
The name of this field used by the application or server.
| FormField | ||
type : String
The type of this field used by user interfaces to render an approprite
control to represent this field.
| FormField | ||
value : String
The chosen value for this field.
| FormField | ||
![]() | XMLData : XML [static]
| XMLStanza | |
![]() | XMLFactory : XMLDocument [static]
| XMLStanza |
Method | Defined by | ||
---|---|---|---|
FormField | |||
![]() | ExtensionContainer | ||
![]() |
addTextNode(parent:XMLNode, elementName:String, value:String):XMLNode
Adds a simple text node to the parent node specified.
| XMLStanza | |
deserialize(node:XMLNode):Boolean
Deserializes the FormField data.
| FormField | ||
![]() |
ensureNode(node:XMLNode, elementName:String):XMLNode
Ensures that a node with a specific element name exists in the stanza.
| XMLStanza | |
![]() |
exists(value:*):Boolean
[static]
A helper method to determine if a value is both not null
and not undefined.
| XMLStanza | |
![]() |
getAllExtensions():Array
| ExtensionContainer | |
![]() |
getAllExtensionsByNS(ns:String):Array
| ExtensionContainer | |
getAllOptions():Array
If options are provided for possible selections of the value they are listed
here.
| FormField | ||
getAllValues():Array
The values for this multiple field.
| FormField | ||
![]() |
getExtension(name:String):Extension
| ExtensionContainer | |
![]() |
getNode():XMLNode
| XMLStanza | |
![]() |
removeAllExtensions(ns:String):void
| ExtensionContainer | |
![]() |
removeExtension(ext:IExtension):Boolean
| ExtensionContainer | |
![]() |
replaceTextNode(parent:XMLNode, original:XMLNode, elementName:String, value:String):XMLNode
Replaces one node in the stanza with another simple text node.
| XMLStanza | |
serialize(parent:XMLNode):Boolean
Serializes the FormField data to XML for sending.
| FormField | ||
setAllOptions(value:Array):void
Sets all the options available from an array of objects
| FormField | ||
setAllValues(value:Array):void
Sets all the values of this field from an array of strings
| FormField | ||
![]() |
setNode(node:XMLNode):Boolean
Sets the XML node that should be used for this stanza's internal XML representation.
| XMLStanza |
Constant | Defined by | ||
---|---|---|---|
ELEMENT_NAME : String = "field" [static]
| FormField |
label | property |
label:String
[read-write]The label of this field used by user interfaces to render a descriptive title of this field
Implementation public function get label():String
public function set label(value:String):void
name | property |
name:String
[read-write]
The name of this field used by the application or server.
Note: this serializes to the var
attribute on the
field node. Since var
is a reserved word in ActionScript
this field uses name
to describe the name of this field.
public function get name():String
public function set name(value:String):void
type | property |
type:String
[read-write]
The type of this field used by user interfaces to render an approprite
control to represent this field.
May be one of the following:
FormExtension.FIELD_TYPE_BOOLEAN
FormExtension.FIELD_TYPE_FIXED
FormExtension.FIELD_TYPE_HIDDEN
FormExtension.FIELD_TYPE_JID_MULTI
FormExtension.FIELD_TYPE_JID_SINGLE
FormExtension.FIELD_TYPE_LIST_MULTI
FormExtension.FIELD_TYPE_LIST_SINGLE
FormExtension.FIELD_TYPE_TEXT_MULTI
FormExtension.FIELD_TYPE_TEXT_PRIVATE
FormExtension.FIELD_TYPE_TEXT_SINGLE
public function get type():String
public function set type(value:String):void
See also
value | property |
value:String
[read-write]
The chosen value for this field. In forms with a type
FormExtension.TYPE_REQUEST
this is typically the default
value of the field.
Applies to the following field types:
FormExtension.FIELD_TYPE_BOOLEAN
FormExtension.FIELD_TYPE_FIXED
FormExtension.FIELD_TYPE_HIDDEN
FormExtension.FIELD_TYPE_JID_SINGLE
FormExtension.FIELD_TYPE_LIST_SINGLE
FormExtension.FIELD_TYPE_LIST_MULTI
FormExtension.FIELD_TYPE_TEXT_PRIVATE
FormExtension.FIELD_TYPE_TEXT_SINGLE
Suggested values can typically be retrieved in getAllOptions
public function get value():String
public function set value(value:String):void
FormField | () | constructor |
public function FormField()
deserialize | () | method |
public function deserialize(node:XMLNode):Boolean
Deserializes the FormField data.
Parametersnode:XMLNode — The XML node associated this data
|
Boolean — An indicator as to whether deserialization was successful
|
getAllOptions | () | method |
public function getAllOptions():Array
If options are provided for possible selections of the value they are listed
here.
Applies to the following field types:
FormExtension.FIELD_TYPE_JID_MULTI
FormExtension.FIELD_TYPE_JID_SINGLE
FormExtension.FIELD_TYPE_LIST_MULTI
FormExtension.FIELD_TYPE_LIST_SINGLE
Array — Array of objects with the properties label and value
|
getAllValues | () | method |
public function getAllValues():Array
The values for this multiple field. In forms with a type
FormExtension.TYPE_REQUEST
these are typically the existing
values of the field.
Applies to the following field types:
FormExtension.FIELD_TYPE_JID_MULTI
FormExtension.FIELD_TYPE_LIST_MULTI
FormExtension.FIELD_TYPE_TEXT_MULTI
Array — Array containing strings representing the values of this field
|
serialize | () | method |
public function serialize(parent:XMLNode):Boolean
Serializes the FormField data to XML for sending.
Parametersparent:XMLNode — The parent node that this item should be serialized into
|
Boolean — An indicator as to whether serialization was successful
|
setAllOptions | () | method |
public function setAllOptions(value:Array):void
Sets all the options available from an array of objects
Parametersvalue:Array — containing objects with the properties label and
value
|
setAllValues | () | method |
public function setAllValues(value:Array):void
Sets all the values of this field from an array of strings
Parametersvalue:Array — Array of Strings
|
ELEMENT_NAME | constant |
public static const ELEMENT_NAME:String = "field"