cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Salvetti <>
Subject Re: CForms: inserting unique node on save
Date Sat, 15 Jan 2005 05:56:21 GMT
I'm not too sure, but i think you need a repeater, you can just trop the 
add and remove buttons in the template and just add a node in the dom 
tree from the flow, before the form is binded.

hope this help


Andrew MacDonald a écrit :

>I'm using CForms to edit an XML file, but can't figure
>out how to insert a unique node when saving the
>Here is what the default doc looks like:
><?xml version="1.0"?>
>  <toolDetails>
>    <toolName>tool</toolName>
>    <toolDescription>description</toolDescription>
>    <endpointURL>URL</endpointURL>
>    <serviceURI>URI</serviceURI>
>    <serviceMethod>method</serviceMethod>
>  </toolDetails>
>  <params>
>    <param id="1">
>      <label/>
>      <paramName/>
>      <value/>
>      <soapType/>
>      <defaultValue/>
>      <display/>
>      <listItems>
>        <listItem id="1">
>          <label>preset1</label>
>          <value>preset1</value>
>        </listItem>
>        <listItem id="2">
>          <label>preset2</label>
>          <value>preset2</value>
>        </listItem>
>      </listItems>
>    </param>
>  </params>
>Basically I want to insert a new <param> node (and
>increase the id value for it).  Currently when use the
> method it overwrites the first <param>.
> I've been trying to specify the last <param> node in
>my binding file but get a "JXPath can only create a
>path if it uses exclusively the child:: and
>attribute:: axes and has no context-dependent
>predicates" error, so I'm assuming something like
>"<fb:value id="label" path="param[last()]/label"/>"
>will not work.
>Oh, and although I'm using a repeater for <listItems>
>I can't use that for <params> due to the way the forms
>are set up.
>Any help would be greatly appreciated!
>Andrew MacDonald
>Do you Yahoo!? 
>Yahoo! Mail - You care about security. So do we. 
>To unsubscribe, e-mail:
>For additional commands, e-mail:

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

View raw message