cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stev...@outerthought.org
Subject [WIKI-UPDATE] WoodyBinding Woody Wed Mar 3 15:00:04 2004
Date Wed, 03 Mar 2004 14:00:05 GMT
Page: http://wiki.cocoondev.org/Wiki.jsp?page=WoodyBinding , version: 31 on Tue Mar  3 13:39:57
2004 by AntonioGallardo

- |wb:repeater|binds repeater widgets|id, parent-path, row-path, unique-row-id, unique-path|
wd:convertor,  wb:on-bind, wb:on-delete-row, wb:on-insert-row
+ |wb:repeater|binds repeater widgets|id, parent-path, row-path, unique-row-id (deprecated),
unique-path (deprecated)| wd:convertor,  wb:on-bind, wb:on-delete-row, wb:on-insert-row, wb:unique-row
?                                                                             +++++++++++++
            +++++++++++++                                                               +++++++++++++++

+ |wb:unique-field|specifies unique fields in a repeater row|id, path|wd:convertor
- * unique-row-id
- * unique-path
+ * unique-row-id (deprecated)
+ * unique-path (deprecated)
- The wb:repeater binding binds repeaters based on the concept that each row in the repeater
should contain a widget containing a unique identification for that row. This unique identification
is necessary to know which rows in the repeater correspond to which objects in the target
collection. Newly added rows in the repeater can (but should not) have a null value for this
identification widget. This identification field will typically not be editable, so in most
cases it will be an output widget.
+ __NOTE:__ The {{unique-row-id}} and {{unique-path}} are deprecated in favor of __<wb:unique-row>__
child element.
- The id attribute should contain the id of the repeater. The nested wd:converter element
can be used to specify the convertor to use in case the id value from the model to bind is
a String (typical for XML documents) while the widget inside the repeater has another type.
+ The __wb:repeater__ binding binds repeaters based on the concept that each row in the repeater
should contain a widget containing a unique identification for that row. This unique identification
is necessary to know which rows in the repeater correspond to which objects in the target
collection. Newly added rows in the repeater can (but should not) have a null value for this
identification widget. This identification field will typically not be editable, so in most
cases it will be an output widget.
- The unique-row-id attribute specifies the id of the widget appearing on each repeater row
that contains the unique identification for that row. The unique-path attribute contains the
corresponding path in the object model.
+ The __id__ attribute should contain the id of the repeater. The nested wd:converter element
can be used to specify the convertor to use in case the id value from the model to bind is
a String (typical for XML documents) while the widget inside the repeater has another type.
+ The __unique-row-id__ attribute specifies the id of the widget appearing on each repeater
row that contains the unique identification for that row. The __unique-path__ attribute contains
the corresponding path in the object model. __Both attributes are deprecated__. Instead use
__<wb:unique-row>__ child element.
+ 
- The parent-path and row-path elements can best be understood when described differently
for XML documents and Javabeans.
?                               ------

+ The __parent-path__ and __row-path__ attributes can best be understood when described differently
for XML documents and Javabeans.
?     ++           ++     ++        ++ ++++++++

- A childelement wd:convertor can be used to specify the convertor to use in case the unique-id
from the model is a String and the matching widget inside the repeater has a different type.
+ A childelement __wd:convertor__ can be used to specify the convertor to use in case the
unique-id from the model is a String and the matching widget inside the repeater has a different
type.
?                ++            ++

- The children of the wb:on-bind element are executed when an existing repeater row is updated,
or after inserting a new row. The JXPath context is automatically changed to match the current
row. 
+ The children of the __wb:on-bind__ element are executed when an existing repeater row is
updated, or after inserting a new row. The JXPath context is automatically changed to match
the current row. 
?                     ++          ++

- The children of the wb:on-delete-row element are executed when a repeater row has been deleted.
If you want to delete the row, then put a <wb:delete-node/> in there. Alternatively,
you could also use the wb:set-attribute binding to set e.g. an attribute "status" to "deleted".
+ The children of the __wb:on-delete-row__ element are executed when a repeater row has been
deleted. If you want to delete the row, then put a __<wb:delete-node/>__ in there. Alternatively,
you could also use the __wb:set-attribute__ binding to set e.g. an attribute "status" to "deleted".
?                     ++                ++                                               
                                                      ++                 ++              
                                  ++                ++

- The children of the wb:on-insert-row are executed in case a new row has been added to the
repeater. Typically this will contain a wb:insert-node or a wb:insert-bean binding (see the
descriptions of these binding elements for more details).
+ The children of the __wb:on-insert-row__ are executed in case a new row has been added to
the repeater. Typically this will contain a __wb:insert-node__ or a __wb:insert-bean binding__
(see the descriptions of these binding elements for more details).
?                     ++                ++                                               
                                              ++              ++      ++                 
    ++

+ 
+ The childrens of the __wb:unique-row__ specifies the widgets appearing on each repeater
row whose values are the unique identification of that row. Each __<wb:unique-field>__
child specifies one widget.
+ 
+ 
+ !!wb:unique-field
+ ''Attributes:''
+ * id
+ * path
+ * direction (optional)
+ 
+ ''Child elements:''
+ * wd:convertor (note the wd: namespace!) (optional)
+ 
+ This unique-field element references a field widget that is part of the <wb:unique-row>
child element of a <wb:repeater>. The __id__ nad __path__ attributes have the same meaning
as in <wb:value>.
+ 
+ The __wd:convertor__ element has the same purpose as the wd:convertor element in the form
definition: it converts between objects (numbers, dates) and strings. Is used when binding
from XML documents to read the data in the appropiate format. For more info see the description
of this element in <wb:value>.
+ 
+ ''Note:'' This binding is only active on 'load' operation, so there specify {{ attribute="save"}}
is meanless. 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=Woody , version: 30 on Tue Mar  3 13:05:26 2004
by AntonioGallardo

+ [[Mar 02, 2004]
+ * New [unique-row|http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=107825340322323&w=2]
child element of <wb:repeater>, allow define more than 1 unique-row-id in repeater binding.
(Antonio)
+ 
+ 
+ 



Mime
View raw message