Packageorg.igniterealtime.xiff.data.forms
Classpublic class FormExtension
InheritanceFormExtension Inheritance Extension Inheritance XMLStanza Inheritance ExtensionContainer Inheritance Object
Implements IExtension

XEP-0004: Data Forms

Implements the base functionality of XEP-0004: Data Forms, shared by all MUC extensions.

Also used by XEP-0128: Service Discovery Extensions

See also

http://xmpp.org/extensions/xep-0004.html
http://xmpp.org/extensions/xep-0128.html


Public Properties
 PropertyDefined 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
 Inheritedxml : XML
[override] Override in order to take care of setting the Namespace and checking for containing extensions.
Extension
Public Methods
 MethodDefined By
  
FormExtension(parent:XML = null)
FormExtension
 Inherited
Add extension to the list of the given namespace and insert to the XML element as a child.
ExtensionContainer
 Inherited
ExtensionContainer
 Inherited
getAllExtensionsByNS(nameSpace:String):Array
ExtensionContainer
 Inherited
getAttribute(name:String):String
Convinience method for getting element value from the XML.
XMLStanza
 Inherited
getChildAttribute(elem:String, name:String):String
Convinience method for getting child element attribute value from the XML.
XMLStanza
 Inherited
getChildField(elem:String, name:String):String
Convinience method for getting child element value from the XML.
XMLStanza
  
FormExtension
 Inherited
getExtension(elementName:String):IExtension
Get the extension having the given element name.
ExtensionContainer
 Inherited
getField(name:String):String
Convinience method for getting element value from the XML.
XMLStanza
  
getFormField(varName:String):FormField
FormExtension
  
getNS():String
FormExtension
 Inherited
remove():void
Removes the extension from its parent.
Extension
 Inherited
removeAllExtensions(nameSpace:String):void
ExtensionContainer
 Inherited
removeExtension(extension:IExtension):Boolean
ExtensionContainer
 Inherited
removeFields(name:String):void
Helper method for removing all child elements that have the given name.
XMLStanza
 Inherited
setAttribute(name:String, value:String):void
Convinience method for setting a value to a element in the XML.
XMLStanza
 Inherited
setChildAttribute(elem:String, name:String, value:String):void
Convinience method for setting an attribute for a child element of the XML.
XMLStanza
 Inherited
setChildField(elem:String, name:String, value:String):void
Convinience method for setting a value for a child element of the XML.
XMLStanza
 Inherited
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
 Inherited
toString():String
Converts the base stanza XML to a string.
XMLStanza
Public Constants
 ConstantDefined By
 InheritedDEFAULT_NS : Namespace
[static] Default XML namespace.
XMLStanza
  ELEMENT_NAME : String = x
[static]
FormExtension
 InheritedFLASH_NS : Namespace
[static]
XMLStanza
  NS : String = jabber:x:data
[static]
FormExtension
 InheritedSTREAM_NS : Namespace
[static]
XMLStanza
Property Detail
fieldsproperty
fields:Array

Interface to array of fields.


Implementation
    public function get fields():Array
    public function set fields(value:Array):void
formTypeproperty 
formType:String  [read-only]

This is an accessor to the hidden field type FORM_TYPE easily check what kind of form this is.


Implementation
    public function get formType():String

See also

instructionsproperty 
instructions:Array

Natural-language instructions to be followed by the form-submitting entity.


Implementation
    public function get instructions():Array
    public function set instructions(value:Array):void
itemsproperty 
items:Array

Interface to array of items.


Implementation
    public function get items():Array
    public function set items(value:Array):void

See also

reportedproperty 
reported:FormReported

An element defining the data format for the result items.


Implementation
    public function get reported():FormReported
    public function set reported(value:FormReported):void
titleproperty 
title:String

The title of this form


Implementation
    public function get title():String
    public function set title(value:String):void
typeproperty 
type:String

The type of form. May be one of the following: FormType.FORM FormType.SUBMIT FormType.CANCEL FormType.RESULT


Implementation
    public function get type():String
    public function set type(value:String):void
Constructor Detail
FormExtension()Constructor
public function FormExtension(parent:XML = null)

Parameters
parent:XML (default = null)
Method Detail
getElementName()method
public function getElementName():String

Returns
String
getFormField()method 
public function getFormField(varName:String):FormField

Parameters

varName:String — The varName of the form field to retrieve

Returns
FormField — FormField the matching form field
getNS()method 
public function getNS():String

Returns
String
setFieldMap()method 
public function setFieldMap(fieldMap:Object):void

Sets 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, ... ] }

Constant Detail
ELEMENT_NAMEConstant
public static const ELEMENT_NAME:String = x

NSConstant 
public static const NS:String = jabber:x:data