| Home | Trees | Index | Help |
|---|
GTriggerCore--+ |object--+ | | |ParserObj--+ |GObj--+ |GTriggerExtension--+ |GFObj--+ | GFField
A field manages a database column, possibly with foreign key lookup.
A field has two different values. The DB value, which is the value read from/written into the database backend, and the user value, which is the value displayed in a form. Those values are different when the field uses foreign key lookup.| Method Summary | |
|---|---|
__init__(self,
parent)
| |
Phase 1 initialization called after all objects of the XML tree were created. | |
Return a tuple with allowed values dictionary (mapping keys to values) and a sequence of the fk-descriptions. | |
| tuple of (unicode, integer) |
Return the first valid user value that starts with the provided part. |
Notify the field that it has received the focus. | |
Notify the field that it is going to lose the focus. | |
Return the current user value of the field. | |
is_editable(self,
offset)
| |
isEmpty(self)
| |
refresh_choices(self)
| |
Reload the allowed values of the field. | |
Reset the current field to the default value. | |
Return the DB value for a given user value. | |
Set the current user value of the field. | |
triggerAutofillBySequence(self,
sequenceName)
| |
Validate the field to decide whether the focus can be moved away from it. | |
Notify the field that the db or query value behind it has changed. | |
| Inherited from GFObj | |
Return wether the object is currently navigable or not. | |
Return the objects' block from the block mapping. | |
Returns the objects' field from the blocks' field mapping | |
Return the value of a given option of the object or None if no such option is present. | |
Return wether the object is currently navigable or not. | |
Phase 1 initialization called after all objects of the XML tree were created. | |
| Inherited from GObj | |
| |
| |
Dumps an XML representation of the object | |
This is a convenience function for applications NOT using GParser to load an object tree. | |
A convenience function for applications NOT using GParser to load an object tree. | |
| string |
Returns the xml tag to be used to represent the object. |
Return a python iterator of child objects. | |
maxInits returns the maximum size of all the _inits list from this object or it's children | |
Starts GNUe's phased initialization system from this object down. | |
A recusive function to print an indented text representation of the GObj tree from this object down. | |
Function that recursively walks down through a tree of ParserObj instances and applies a function
to them. | |
| Inherited from GTriggerCore | |
| |
Construct a namespace object tree from an XML ( definitions.GObjects.GObj) object tree. | |
Return the namespace object that mirrors this object in the action/trigger namespace. | |
| Inherited from ParserObj | |
Set the action attribute of a given object to the specified action. | |
Get the contents of this object. | |
Return a compareable and identifying id of an object within a tree. | |
Set attributes loaded by GParser. | |
Add an object to the list of children | |
Assign all attributes from a given object to this one. | |
Build an object tree representing the difference between two object trees. | |
Return a XML representation of the object. | |
Moves downward though the children of an object till it finds the child with the specified name. | |
Moves downward through the children of an object till it finds the child of the specified type. | |
Find all children of a specific type. | |
Moves upward though the parents of an object till it finds the parent of the specified type. | |
Returns the content of any GContent objects that are children of this object. | |
Return a useful description of the object. | |
| any |
Returns the immediate parent of an object instance in a GObj tree. |
Merge another object tree into this tree. | |
Set the immediate parent of an object instance in a GObj tree | |
| Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
Return hash(x)... | |
Return a new object with type S, a subtype of T... | |
helper for pickle | |
helper for pickle | |
x.__setattr__('name', value) <==> x.name = value | |
Return str(x)... | |
| Inherited from GTriggerExtension | |
Associate a trigger with this object. | |
Fire the requested trigger if a trigger of that type has been associated with this object. | |
| Property Summary | |
|---|---|
| Inherited from GFObj | |
has_label | |
| Method Details |
|---|
__init__(self,
parent=None)
|
_phase_1_init_(self)Phase 1 initialization called after all objects of the XML tree were created. Descendants can overwrite this function to perform actions after construction of the objects.
|
allowedValues(self)Return a tuple with allowed values dictionary (mapping keys to values) and a sequence of the fk-descriptions. |
autocomplete(self, value, cursor)Return the first valid user value that starts with the provided part. The entry can use this function to implement autocompletion.
|
focus_in(self)Notify the field that it has received the focus. |
focus_out(self)Notify the field that it is going to lose the focus. The focus change is already decided at this moment, there is no way to stop the focus from changing now. |
get_value(self, offset=0)Return the current user value of the field. For lookup fields, this is the foreign key description. |
is_editable(self, offset) |
isEmpty(self) |
refresh_choices(self) |
resetForeignKey(self, resultSet=None)Reload the allowed values of the field. If a ResultSet is provided the values will be retrieved from it, otherwise a new ResultSet will be creteated (using the fk_source).
|
resetToDefault(self)Reset the current field to the default value. |
reverse_lookup(self, value)Return the DB value for a given user value.
|
set_value(self, value)Set the current user value of the field. For lookup fields, this is the foreign key description. |
triggerAutofillBySequence(self, sequenceName) |
validate(self)Validate the field to decide whether the focus can be moved away from it. This function can raise an exception, in which case the focus change will be prevented. |
value_changed(self, new_value)Notify the field that the db or query value behind it has changed. This function gets called whenever the user interface has to be updated.
|
| Home | Trees | Index | Help |
|---|
| Generated by Epydoc 2.1 on Tue Oct 14 23:03:35 2008 | http://epydoc.sf.net |