SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Constructor Summary | |
DataForm()
This class is implemented in a rather procedural way, but it works for now. |
Method Summary | |
|
getFieldDescription(fieldName)
Returns the natural language description for a field TODO the schema allows 0 to unbounded, see if that's ever used in practice. |
|
getFieldElem(fieldName)
Returns a DOM Element for a field name. |
|
getFieldLabel(fieldName)
Gets the label of a field, as returned by the server |
|
getFieldNames()
Returna an array of field names |
|
getFieldOptions(fieldName)
Returns an array of options for a given radio field, in an array of { label, value } |
|
getFieldType(fieldName)
Gets the type of a given field ( as defined in XEP-0004 )- |
|
getFieldValues(fieldName)
Returns an array of values. |
|
getInstructions()
Returns the content of the first instruction node. |
|
getTitle()
Returns the title of the form TODO the schema allows 0 to unbounded, see if that's ever used in practice. |
|
getType()
Returns the type of form action. |
|
isFieldRequired(fieldName)
Returns whether a field is required or not. |
|
read(node)
Clones the given node and returns a reference to it |
|
setFieldValues(fieldName, value, saveExisting)
Set a field value, either singular or array. |
|
write(node)
Writes to the given node. |
Constructor Detail |
DataForm()
Method Detail |
getFieldDescription(fieldName)
fieldName
getFieldElem(fieldName)
fieldName
getFieldLabel(fieldName)
fieldName
getFieldNames()
getFieldOptions(fieldName)
fieldName
getFieldType(fieldName)
fieldName
getFieldValues(fieldName)
fieldName
getInstructions()
getTitle()
getType()
isFieldRequired(fieldName)
fieldName
read(node)
node
setFieldValues(fieldName, value, saveExisting)
fieldName
value
saveExisting
write(node)
Element node
- The parent node to append to.