Package gavo :: Package rscdef :: Module group :: Class Group
[frames] | no frames]

Class Group

source code

                   object --+            
                            |            
 base.structure.StructureBase --+        
                                |        
                   object --+   |        
                            |   |        
           base.common.Parser --+        
                                |        
base.structure.ParseableStructure --+    
                                    |    
             base.structure.Structure --+
                                        |
                                       Group

A group is a collection of columns, parameters and other groups with a dash of metadata.

Within a group, you can refer to columns or params of the enclosing table by their names. Nothing outside of the enclosing table can be part of a group.

Rather than referring to params, you can also embed them into a group; they will then *not* be present in the embedding table.

Groups may contain groups.

One application for this is grouping input keys for the form renderer. For such groups, you probably want to give the label property (and possibly cssClass).

Nested Classes

Inherited from base.structure.StructureBase: __metaclass__

Instance Methods
 
onParentComplete(self)
checks that param and column names can be found in the parent table.
source code
 
iterColumns(self)
iterates over columns within this group.
source code
 
iterParams(self)
iterates over all params within this group.
source code
 
clearProperty(self, name) source code
 
getProperty(self, name, default=<Undefined>) source code
 
hasProperty(self, name) source code
 
setProperty(self, name, value) source code

Inherited from base.structure.Structure: __provides__, callCompletedCallbacks, completeElement, finishElement, onElementComplete, validate

Inherited from base.structure.ParseableStructure: __init__, end_, feed, feedFrom, feedObject, getAttribute, iterEvents, start_, value_

Inherited from base.structure.StructureBase: __providedBy__, adopt, breakCircles, change, copy, getAttributes, getCopyableAttributes, getSourcePosition, iterChildren, setPosition

Inherited from base.common.Parser: feedEvent

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods

Inherited from base.structure.StructureBase: fromStructure

Class Variables
  name_ = 'group'
a sentinel for all kinds of undefined values.
  attrSeq = [<gavo.base.complexattrs.StructListAttribute object>...
  managedAttrs = {'columnRef': <gavo.base.complexattrs.StructLis...

Inherited from base.structure.Structure: __implemented__

Inherited from base.structure.StructureBase: completedCallbacks

Properties
  table
the table definition this group lives in.

Inherited from object: __class__

Method Details

iterParams(self)

source code 

iterates over all params within this group.

This includes both params refereced in the parent table and immediate params.


Class Variable Details

attrSeq

Value:
[<gavo.base.complexattrs.StructListAttribute object>,
 <gavo.base.attrdef.NWUnicodeAttribute object>,
 <gavo.base.complexattrs.StructListAttribute object>,
 <gavo.base.parsecontext.IdAttribute object>,
 <gavo.rscdef.column.ParamNameAttribute object>,
 <gavo.base.complexattrs.StructListAttribute object>,
 <gavo.rscdef.common.ColumnListAttribute object>,
 <gavo.base.complexattrs.PropertyAttribute object>,
...

managedAttrs

Value:
{'columnRef': <gavo.base.complexattrs.StructListAttribute object>,
 'columnRefs': <gavo.base.complexattrs.StructListAttribute object>,
 'description': <gavo.base.attrdef.NWUnicodeAttribute object>,
 'group': <gavo.base.complexattrs.StructListAttribute object>,
 'groups': <gavo.base.complexattrs.StructListAttribute object>,
 'id': <gavo.base.parsecontext.IdAttribute object>,
 'name': <gavo.rscdef.column.ParamNameAttribute object>,
 'param': <gavo.rscdef.common.ColumnListAttribute object>,
...

Property Details

table

the table definition this group lives in.

For nested groups, this still is the ancestor table.

Get Method:
unreachable.table(self) - the table definition this group lives in.