cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stev...@outerthought.org
Subject [WIKI-UPDATE] WoodyBinding Wed Nov 5 19:00:03 2003
Date Wed, 05 Nov 2003 18:00:05 GMT
Page: http://wiki.cocoondev.org/Wiki.jsp?page=WoodyBinding , version: 12 on Wed Nov  5 17:31:08
2003 by AntonioGallardo

- A binding can work with any object and can perform the binding in any possible way. Currently
one implementation is available, based on JXPath. JXPath allows to address data in both beans
and XML documents using XPath expressions, so this binding implementation can be used both
with beans and XML documents. The rest of this document will focus on this implementation.
+ A binding can work with any object and can perform the binding in any possible way. Currently
one implementation is available, based on [JXPath|http://jakarta.apache.org/commons/jxpath/index.html].
JXPath allows to address data in both beans and XML documents using [XPath expressions|http://www.w3.org/TR/xpath#section-Expressions],
so this binding implementation can be used both with beans and XML documents. The rest of
this document will focus on this implementation.
?                                                                                        
                                                +      +++++++++++++++++++++++++++++++++++++++++++++++++++++
                                                                     +                 ++++++++++++++++++++++++++++++++++++++++++++++++

- The binding is configured using an XML file. This XML file contains elements in the "wb"
(Woody Binding) namespace:
?                                                                                     ^  ^
               ----------

+ The binding is configured using an XML file. This XML file contains elements in the __wb__
namesspace (Woody Binding):
?                                                                                     ^^ 
^^^^^^^^^^^^^

- http://apache.org/cocoon/woody/binding/1.0
+ xmlns:wb=http://apache.org/cocoon/woody/binding/1.0
? +++++++++

-   <wb:value id="firstname" path="firstName"/>
+     <wb:value id="firstname" path="firstName"/>
? ++

-   <wb:value id="lastname" path="lastName"/>
+     <wb:value id="lastname" path="lastName"/>
? ++

-   <wb:value id="email" path="email"/>
+     <wb:value id="email" path="email"/>
? ++

+ The __id__ attribute identify the [widget|WoodyWidgetReference].
- The id's identify widgets, the paths address items in the target object (a Javabean or an
XML document). The paths can be arbitrary JXPath expressions.
? ^    ^^   -------------- -    ------

+ the __path__ attributes is the address items in the target object (a Javabean or an XML
document). The paths can be arbitrary JXPath expressions.
? ^   +++++++++++++ ^^^^

- The wb:context element changes the JXPath context to the specified path. The path expressions
on the binding elements occuring inside the context element will then be evaluated in this
context, thus relative to the path specified on the wb:context element.
+ The __wb:context__ element changes the [JXPath context|http://jakarta.apache.org/commons/jxpath/apidocs/org/apache/commons/jxpath/JXPathContext.html]
to the specified path. The path expressions on the binding elements occuring inside the context
element will then be evaluated in this context, thus relative to the path specified on the
wb:context element.
?     ++          ++                     +              +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

- The wb:value element is used to bind the value of a widget.
+ The __wb:value__ element is used to bind the value of a widget.
?     ++        ++

- !!!Quick overview of supported binding elements
?          ^^  -- ^

+ !!!Quick reference of supported binding elements
?          ^^^   ^^^

+ ||Element||Description||Attributes||child elements
- |wb:context|changes the JXPath context
+ |wb:context|changes the JXPath context|path|any
?                                       +++++++++

- |wb:value|binds the value of widgets
+ |wb:value|binds the value of widgets|id, path, readonly|wb:on-update, wd:convertor
- |wb:aggregate|binds aggregatefield widgets
+ |wb:aggregate|binds aggregatefield widgets|id, path|wb:value
?                                           ++++++++++++++++++

- |wb:repeater|binds repeater widgets
+ |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:set-attribute|sets an attribute to a fixed value
+ |wb:set-attribute|sets an attribute to a fixed value| name, value|none
?                                                     ++++++++++++++++++

- |wb:delete-node|deletes the current context node
+ |wb:delete-node|deletes the current context node|none|none
?                                                 ++++++++++

- |wb:insert-node|insert a node in an XML document
+ |wb:insert-node|insert a node in an XML document|src, xpath|piece of XML that should be
inserted
- |wb:insert-bean|inserts an object in a list-type bean property
+ |wb:insert-bean|inserts an object in a list-type bean property|classname, addmethod|
?                                                               ++++++++++++++++++++++

- !!!Detailed descriptions of binding elements
?             ^ ^ ^^^^^^^^

+ !!!Detailed reference of binding elements
?             ^ ^^^^^ ^




Mime
View raw message