cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oceatoon <t.katelb...@systheo.com>
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
"totos"

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

document:
<doc>
        <name id="coco">

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

        </name> 
</doc>

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
Tibor


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message