Timothy Larson wrote:

In a cforms (Woody) binding is there any simple
syntax that actually works similar to:
 <wb:value id="type" path="name()"/>

Right now I am using this workaround:
<wb:javascript id="type" path=".">
<wb:load-form>
widget.setValue(jxpathPointer.getNode().getLocalName());
</wb:load-form>
<wb:save-form>
// Don't worry about save behaviour yet...
</wb:save-form>
</wb:javascript>



The versatility of JavaScript shows to be handy for very specific cases ;-)


We use it a lot for weird bindings that cannot be expressed with a single XPath expression for two-way binding.

Sylvain

--
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com




Reply via email to