Method Summary |
|
__init__ (self,
name,
values,
field_type,
label,
options,
required,
desc,
value)
Initialize a Field object. |
|
__getattr__(self,
name)
|
|
__setattr__(self,
name,
value)
|
|
add_option (self,
values,
label)
Add an option for the field. |
|
complete_xml_element (self,
xmlnode,
doc)
Complete the XML node with self content. |
Field |
_new_from_xml (cls,
xmlnode)
Create a new Field object from an XML element. (Class method)
|
Inherited from StanzaPayloadObject |
libxml2.xmlNode or libxml2.xmlDoc |
as_xml (self,
parent,
doc)
Get the XML representation of self . |
Inherited from object |
|
__delattr__ (...)
x.__delattr__('name') <==> del x.name |
|
__getattribute__ (...)
x.__getattribute__('name') <==> x.name |
|
__hash__ (x)
x.__hash__() <==> hash(x) |
|
__new__ (T,
S,
...)
T.__new__(S, ...) -> a new object with type S, a subtype of T |
|
__reduce__ (...)
helper for pickle |
|
__reduce_ex__ (...)
helper for pickle |
|
__repr__ (x)
x.__repr__() <==> repr(x) |
|
__str__ (x)
x.__str__() <==> str(x) |
Instance Variable Summary |
unicode |
desc : natural-language description of the field. |
unicode |
label : field label (human-readable description). |
unicode |
name : field name. |
Option |
options : field options (for "list-multi" or "list-single" fields). |
boolean |
required : True when the field is required. |
str |
type : field type ("boolean", "fixed", "hidden", "jid-multi",
"jid-single", "list-multi", "list-single", "text-multi",
"text-private" or "text-single"). |
bool for "boolean" field, JID for "jid-single", list of JID
for "jid-multi", list of unicode for "list-multi" and "text-multi"
and unicode for other field types. |
value : field value parsed according to the form type. |
list of unicode |
values : field values. |