| Package | org.igniterealtime.xiff.data.forms |
| Class | public class FormExtension |
| Inheritance | FormExtension Extension XMLStanza ExtensionContainer Object |
| Implements | IExtension |
Implements the base functionality of XEP-0004: Data Forms, shared by all MUC extensions.
Also used by XEP-0128: Service Discovery Extensions
See also
| Property | Defined By | ||
|---|---|---|---|
| fields : Array
Interface to array of fields. | FormExtension | ||
| formType : String [read-only]
This is an accessor to the hidden field type FORM_TYPE
easily check what kind of form this is. | FormExtension | ||
| instructions : Array
Natural-language instructions to be followed by the form-submitting entity. | FormExtension | ||
| items : Array
Interface to array of items. | FormExtension | ||
| reported : FormReported
An element defining the data format for the result items. | FormExtension | ||
| title : String
The title of this form
| FormExtension | ||
| type : String
The type of form. | FormExtension | ||
![]() | xml : XML [override]
Override in order to take care of setting the Namespace and
checking for containing extensions. | Extension | |
| Method | Defined By | ||
|---|---|---|---|
FormExtension(parent:XML = null) | FormExtension | ||
![]() |
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 | |
getElementName():String | FormExtension | ||
![]() | 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 | |
getFormField(varName:String):FormField | FormExtension | ||
getNS():String | FormExtension | ||
![]() | remove():void
Removes the extension from its parent. | Extension | |
![]() | 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 | |
setFieldMap(fieldMap:Object):void
Sets the fields given a fieldMap object containing keys of field vars
and values of value arrays. | FormExtension | ||
![]() | 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 = x [static] | FormExtension | ||
![]() | FLASH_NS : Namespace [static]
| XMLStanza | |
| NS : String = jabber:x:data [static] | FormExtension | ||
![]() | STREAM_NS : Namespace [static]
| XMLStanza | |
| fields | property |
fields:ArrayInterface to array of fields.
public function get fields():Array public function set fields(value:Array):void| formType | property |
formType:String [read-only]
This is an accessor to the hidden field type FORM_TYPE
easily check what kind of form this is.
public function get formType():StringSee also
| instructions | property |
instructions:ArrayNatural-language instructions to be followed by the form-submitting entity.
public function get instructions():Array public function set instructions(value:Array):void| items | property |
items:ArrayInterface to array of items.
public function get items():Array public function set items(value:Array):voidSee also
| reported | property |
reported:FormReportedAn element defining the data format for the result items.
public function get reported():FormReported public function set reported(value:FormReported):void| title | property |
title:StringThe title of this form
public function get title():String public function set title(value:String):void| type | property |
type:String
The type of form.
May be one of the following:
FormType.FORM
FormType.SUBMIT
FormType.CANCEL
FormType.RESULT
public function get type():String public function set type(value:String):void| FormExtension | () | Constructor |
public function FormExtension(parent:XML = null)Parameters
parent:XML (default = null) |
| getElementName | () | method |
public function getElementName():StringReturnsString |
| getFormField | () | method |
public function getFormField(varName:String):FormField
Parameters
varName:String — The varName of the form field to retrieve
|
FormField — FormField the matching form field
|
| getNS | () | method |
public function getNS():StringReturnsString |
| setFieldMap | () | method |
public function setFieldMap(fieldMap:Object):voidSets the fields given a fieldMap object containing keys of field vars and values of value arrays.
Shorthand for setting fields property.
Parameters
fieldMap:Object — Object
Format:
{ "varName": [ value1, value2, ... ] }
|
| ELEMENT_NAME | Constant |
public static const ELEMENT_NAME:String = x| NS | Constant |
public static const NS:String = jabber:x:data