Package | org.igniterealtime.xiff.data.forms |
Class | public class FormField |
Inheritance | FormField ![]() ![]() ![]() |
Implements | INodeProxy |
See also
Property | Defined By | ||
---|---|---|---|
desc : String
A natural-language description of the field, intended for presentation in a user-agent
(e.g., as a "tool-tip", help button, or explanatory text provided near the field). | FormField | ||
label : String
A human-readable name for the field. | FormField | ||
options : Array
If options are provided for possible selections of the value they are listed here. | FormField | ||
required : Boolean
If true, flags the field as required in order for the form to be considered valid. | 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 | ||
values : Array
The values for this multiple field. | FormField | ||
varName : String
The var of this field used to uniquely identify the field in the context of the form. | FormField | ||
![]() | xml : XML
The XML node that should be used for this stanza's internal XML representation,
base of the XMLStanza, XML element. | ExtensionContainer |
Method | Defined By | ||
---|---|---|---|
FormField(type:String = null, varName:String = null, values:Array = null, options:Array = null, label:String = null, desc:String = null, required:Boolean = false) | FormField | ||
![]() |
Add extension to the list of the given namespace and insert to the XML element as a child. | ExtensionContainer | |
![]() | getAllExtensions():Array | ExtensionContainer | |
![]() | getAllExtensionsByNS(nameSpace:String):Array | ExtensionContainer | |
![]() | getAttribute(name:String):String
Convinience method for getting element value from the XML. | XMLStanza | |
![]() | getChildAttribute(elem:String, name:String):String
Convinience method for getting child element attribute value from the XML. | XMLStanza | |
![]() | getChildField(elem:String, name:String):String
Convinience method for getting child element value from the XML. | XMLStanza | |
![]() | getExtension(elementName:String):IExtension
Get the extension having the given element name. | ExtensionContainer | |
![]() | getField(name:String):String
Convinience method for getting element value from the XML. | XMLStanza | |
![]() | removeAllExtensions(nameSpace:String):void | ExtensionContainer | |
![]() | removeExtension(extension:IExtension):Boolean | ExtensionContainer | |
![]() | removeFields(name:String):void
Helper method for removing all child elements that have the given name. | XMLStanza | |
![]() | setAttribute(name:String, value:String):void
Convinience method for setting a value to a element in the XML. | XMLStanza | |
![]() | setChildAttribute(elem:String, name:String, value:String):void
Convinience method for setting an attribute for a child element of the XML. | XMLStanza | |
![]() | setChildField(elem:String, name:String, value:String):void
Convinience method for setting a value for a child element of the XML. | XMLStanza | |
![]() | setField(name:String, value:String):void
Convinience method for setting a value to a element in the XML. | XMLStanza | |
![]() | toString():String
Converts the base stanza XML to a string. | XMLStanza |
Constant | Defined By | ||
---|---|---|---|
![]() | DEFAULT_NS : Namespace [static]
Default XML namespace. | XMLStanza | |
ELEMENT_NAME : String = field [static] | FormField | ||
![]() | FLASH_NS : Namespace [static]
| XMLStanza | |
![]() | STREAM_NS : Namespace [static]
| XMLStanza |
desc | property |
desc:String
A natural-language description of the field, intended for presentation in a user-agent (e.g., as a "tool-tip", help button, or explanatory text provided near the field).
public function get desc():String
public function set desc(value:String):void
label | property |
label:String
A human-readable name for the field.
public function get label():String
public function set label(value:String):void
options | property |
options:Array
If options are provided for possible selections of the value they are listed here.
Applies to the following field types:
FormFieldType.LIST_MULTI
FormFieldType.LIST_SINGLE
Array of objects with the properties label
and value
, {label, value}.
The option element MUST contain one and only one value child. If the field is not of type "list-single" or "list-multi", it MUST NOT contain an option element.
public function get options():Array
public function set options(value:Array):void
required | property |
required:Boolean
If true, flags the field as required in order for the form to be considered valid.
public function get required():Boolean
public function set required(value:Boolean):void
type | property |
type:String
The type of this field used by user interfaces to render an approprite
control to represent this field.
May be one of the following:
FormFieldType.BOOLEAN
FormFieldType.FIXED
FormFieldType.HIDDEN
FormFieldType.JID_MULTI
FormFieldType.JID_SINGLE
FormFieldType.LIST_MULTI
FormFieldType.LIST_SINGLE
FormFieldType.TEXT_MULTI
FormFieldType.TEXT_PRIVATE
FormFieldType.TEXT_SINGLE
public function get type():String
public function set type(value:String):void
See also
value | property |
value:String
The chosen value for this field. In forms with a type
FormType.FORM
this is typically the default
value of the field.
Applies to the following field types:
FormFieldType.BOOLEAN
FormFieldType.FIXED
FormFieldType.HIDDEN
FormFieldType.JID_SINGLE
FormFieldType.LIST_SINGLE
FormFieldType.LIST_MULTI
FormFieldType.TEXT_PRIVATE
FormFieldType.TEXT_SINGLE
Suggested values can typically be retrieved in getAllOptions
public function get value():String
public function set value(value:String):void
values | property |
values:Array
The values for this multiple field. In forms with a type
FormType.FORM
these are typically the existing
values of the field.
Applies to the following field types:
FormFieldType.JID_MULTI
FormFieldType.LIST_MULTI
FormFieldType.TEXT_MULTI
Array containing strings representing the values of this field
public function get values():Array
public function set values(value:Array):void
varName | property |
varName:String
The var of this field used to uniquely identify the field in the context of the form.
Note: this serializes to the var
attribute on the field node.
Since var
is a reserved word in ActionScript
this field uses varName
to describe the var of this field.
public function get varName():String
public function set varName(value:String):void
FormField | () | Constructor |
public function FormField(type:String = null, varName:String = null, values:Array = null, options:Array = null, label:String = null, desc:String = null, required:Boolean = false)
Parameters
type:String (default = null )
| |
varName:String (default = null )
| |
values:Array (default = null )
| |
options:Array (default = null )
| |
label:String (default = null )
| |
desc:String (default = null )
| |
required:Boolean (default = false )
|
ELEMENT_NAME | Constant |
public static const ELEMENT_NAME:String = field