Class WbzRepeat

Object
   |
   +--WbzRepeat

class WbzRepeat

WbzRepeat is a very powerful component, although its only consists of a few hundred lines of code. It allows editing of a number of elements in different display formats.

attributes:

attributetypedescription
selectexpressionthe XPath-expression matching all elements that should be displayed in the repeat. Elements of different type can also be selected e.g. bookmark|folder. But only direct childs of the context-node can be selected.
insertAtexpression describes the node-set after which a new node should be inserted, if there is no matched node. If there is already a matched node, the new nodes are inserted at the end of the list. If theres a sort entry, the new nodes will be inserted at the appropriate position.
type
optional
table | freemanner, in which the entries should be arranged, default is free.
cssClass
optional
QNamename of the css-rule, that should be used when rendering the repeat-container (not the contained elements), default is repeat.
collapsable
optional
booleanThis flag determines whether there is an additional switch that can be used to hide and unhide the list. One can achieve a tree-like component when using this in combination with nested repeats. (See the bookmarks example)

child elements:

configurationcountdescription
sort0-*analog to the sort in XSLT.
create1-*describes the elements, that could be inserted into the liste. A new button will be created for every create-instruction. The label of this button can be set with the label-attribute. The content of this element contains a prototype of the element that should be created, e.g. <person name=''/>.
thead0-1in table-mode it is possible to define a table-header (same as in html:thead).
dialog0-1Allows the configuration of an additional dialog edit-view for the selected entry.
view configuration0-1a new view is created for every matched entry.

Validation is done after the creation, removal or the move of an entry.

See a list of config examples:


Requires:
wobzilla_transaction
wobzilla_componentFactory
wobzilla_sortFactory
wobzilla_xpath
wobzilla_selectionContext