tree.formwidget>treecol.formwidget

In a <tree class="formwidget" the treecol holds the name of the query, the treecells holds the value.

When harvesting, the tree object loops all selected treeitems and adds a seed for every cell that is in a <treecol class="formwidget". Nothing extra is defined on the treecell in xbl, because the treecell tag doesn't really exist in xul.

When seeding, all containers in the tree are opened first. if a name/value pair matches a single treecell, the whole row is selected.

The "value" of a treecell is taken to be either view.getCellValue, or a value attribute on the tree cell (for contentview trees), or the view.getCellText of the cell, in that order. The label is taken to be the view.getCellText.

For multiple select trees, the <treecol class="formwidget index" has a special meaning. If it exists, it's selected row's value is appended to the name of every other <treecol class="formwidget" in the same row. As a result, rows can be grouped on the receiving side, which is usefull for multiple select trees. remember the order of cgi variables is not guaranteed by the spec.

Note: In XUL, once a treerow is selected, it's impossible to undo the selection and select 'nothing'. You might want to add your own 'select none' button somewhere.

Note2: when seeding, if a single cell matches the whole row is selected; this could also erronuously select some other treecell in the same row. A single, "ID" kind of treecol should be enough to identify the whole row.

Example:

<tree class="formwidget"/> <treecols> <treecol name="who" class="formwidget index"/> <treecol name="what" class="formwidget"/> </treecols> <treechildren> <treeitem> <treerow> <treecell label="joe"/> <treecell value="1" label="sex"/> result:
who=joe & what=1 [ & what.label=sex ] or
who=joe & what_joe=1 [ & what_joe.label=sex ]

Additional Attributes:


Additional Properties:


Additional Methods: