cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oceatoon <>
Subject CForm Binding javascript on save JXPathContext
Date Mon, 23 Aug 2004 15:47:19 GMT
Hello everyone 

I am doing XML binding.
On bind save, in a fb:javascript 
I would like to retreive information outside the context of my widget in the
binded document?? But it seems JXPathContext points only to the piece of
the document that concerns him ?? Is this true? 
Having binded my form to the document below, and a repeater widget "totos"
row "toto" to @path , I would like to retreive doc/name/@id on the save
bind of the toto row  but this doesn't seem to work, I cannot go beyond

<fb:repeater id="totos" parent-path="totos" row-path="toto">
 <fb:javascript id="toto" path="@path" direction="save">
    if(widget.getValue() != null){
      var name = jxpathContext.getValue("../../name/@id"));
      var formValue = name + widget.getValue().getHeaders().get("filename");

        <name id="coco">

        <toto path ="blabla.jpg">
        <toto path ="111_blabla.jpg">


I dont know If this is very clear, sorry
Does jxpathContext contain all the binded document? or just the specific
piece concerning the widget?
Thanks for the help

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message