Class jabberwerx.XDataFormItem
Extends
JWModel.
Holds collection of jabberwerx.XDataFormField objects. This class is used in with XDataForm type "result".
Constructor Attributes | Constructor Name and Description |
---|---|
jabberwerx.XDataFormItem(itemNode)
Creates a new XDataFormItem based on the passed DOM element. |
Field Attributes | Field Name and Description |
---|---|
Array of jabbewerx.XDataFormField objects
|
Method Attributes | Method Name and Description |
---|---|
destroy()
Destroys this item. |
|
equals(item)
Determines if the given item matches this item. |
|
getDOM()
Gets the DOM of the item element. |
|
getFieldByVar(name)
Returns field based on var name or null if not found or name is null. |
|
getFieldValues(name)
Returns field values based on var name or null if not found or name is null. |
Creates a new XDataFormItem based on the passed DOM element.
- Parameters:
- {Element} itemNode Optional
- The DOM element representing the item node.
- Throws:
- {TypeError}
- If parameter is not valid
Destroys this item.
Determines if the given item matches this item. This method returns true if all fields are equal.
- Parameters:
- {jabberwerx.XDataFormItem} item
- The item to match against
- Returns:
- {Boolean} true if {item}'s fields matches this XDataFormItem.
Gets the DOM of the item element.
- Returns:
- {Element} DOM element of the item
Returns field based on var name or null if not found or name is null.
- Parameters:
- {String} name Optional
- Var name for the field
- Returns:
- {jabberwerx.XDataFormField}
Returns field values based on var name or null if not found or name is null.
- Parameters:
- {String} name Optional
- Var name for the field
- Returns:
- {String} 'FORM_TYPE' value for the form