You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Gunter D'Hondt <gu...@sofico.be> on 2004/07/29 10:37:59 UTC

binding twice

Hi,
I've got a strange problem with repeater binding. I'm doing the following:

this.binding.loadFormFromModel(form, doc);
// no changes are made to the form

this.binding.saveFormToModel(form, doc);
// no problem here (all values are correctly bind back)
// save back doc to webservice
// ...
// still no changes are made to the form
this.binding.saveFormToModel(form, doc);
// the following error occurs:
InsertNodeJXPathBinding: done registered factory for inserting node -- 
InsertNodeJXPathBinding [for nested template]
InsertNodeJXPathBinding$1: InsertNode jxpath factory executed for index.0


Below you can find my binding defintion:
<?xml version="1.0"?>
<bnd:context path="/data"  xmlns:bnd="
http://apache.org/cocoon/woody/binding/1.0" lenient="true">
 <bnd:context path="Set">
  <bnd:repeater id="myrepeater" parent-path="." row-path="node" 
unique-row-id="id" unique-path="@id">
    <bnd:on-bind>
      <bnd:value id="field1" path="field1"/>
      <bnd:value id="field2" path="field2" />
      <bnd:value id="field3" path="field3" />
    </bnd:on-bind>
    <bnd:on-delete-row>
      <bnd:set-attribute name="status" value="deleted" />
    </bnd:on-delete-row> 
    <bnd:on-insert-row >
        <bnd:insert-node><todo/></bnd:insert-node> <!-- filled in <todo/> 
since the on-insert-row should never be triggered -->
    </bnd:on-insert-row>
  </bnd:repeater>
 </bnd:context>
</bnd:context>

Regards,
Gunter D'Hondt
SOFICO NV Belgium.

Re: binding twice

Posted by Gunter D'Hondt <gu...@sofico.be>.
Sorry forgot to copy the exception:

org.apache.commons.jxpath.JXPathException: Exception trying to create 
xpath node[1]; Factory could not create a child node for path: 
/data/Set[1]/node[1]

The other was indeed the binding logging; but just don't get why the 
binding wants to insert a new node since there is no change at all

Regards,
Gunter D'Hondt
SOFICO NV Belgium.


 



Marc Portier <mp...@outerthought.org> 
29/07/2004 12:04
Please respond to
users@cocoon.apache.org


To
users@cocoon.apache.org
cc

Subject
Re: binding twice








Gunter D'Hondt wrote:

> Hi,
> 
> I've got a strange problem with repeater binding. I'm doing the 
following:
> 

why do you find this to be an error?

> // the following error occurs:
> InsertNodeJXPathBinding: done registered factory for inserting node -- 
> InsertNodeJXPathBinding [for nested template]
> InsertNodeJXPathBinding$1: InsertNode jxpath factory executed for 
index.0
> 
> 

this appears to be just a transcript of the logging?
-marc=
-- 
Marc Portier                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at                http://blogs.cocoondev.org/mpo/
mpo@outerthought.org                              mpo@apache.org

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



Re: binding twice

Posted by Marc Portier <mp...@outerthought.org>.

Gunter D'Hondt wrote:

> Hi,
> 
> I've got a strange problem with repeater binding. I'm doing the following:
> 

why do you find this to be an error?

> // the following error occurs:
> InsertNodeJXPathBinding: done registered factory for inserting node -- 
> InsertNodeJXPathBinding [for nested template]
> InsertNodeJXPathBinding$1: InsertNode jxpath factory executed for index.0
> 
> 

this appears to be just a transcript of the logging?
-marc=
-- 
Marc Portier                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at                http://blogs.cocoondev.org/mpo/
mpo@outerthought.org                              mpo@apache.org

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