You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Thorsten Scherler <th...@apache.org> on 2005/06/01 09:30:49 UTC

Re: CForm repeater binding deletes prior elements

On Tue, 2005-05-31 at 23:01 +0200, Christofer Dutz wrote:
> As I was just testing a little with the simple-repeater I stumbled over 
> an optional parameter "clear-before-load". Default is set to true, but 
> you could try if seting it to false helps.

> Chris
> 


Cheers Chris,

I tried that but it did not change that behavior. I guess Joachim is
right. :(

On Tue, 2005-05-31 at 17:20 +0200, Joachim Breitsprecher wrote:
> The doSave method of 
> org.apache.cocoon.forms.binding.SimpleRepeaterJXPathBinding contains 
> these lines:
> 
> > // Delete all that is already present
> > repeaterContext.removeAll(this.rowPath);
> 
> So I guess the answer to your first question is: "You cannot" :-
> 

I ended up refactoring the whole design. ;-)

Thx for the tip.

salu2

> Thorsten Scherler wrote:
> 
> >Hello again,
> >
> >lets say I have a two step flow/cform. 
> >
> >In the first I am configuring the first page in the second all other
> >pages. 
> >
> >The result should look like 
> ><folder>
> > <page number="1"/>
> > <page number="2"/>
> > <page number="3"/>
> ></folder>
> >
> >After the first step I got 
> ><folder>
> > <page number="1"/>
> ></folder>
> >
> >Which is just perfect. Now in the second step I get
> ><folder>
> > <page number="2"/>
> > <page number="3"/>
> ></folder>
> >
> >which is not I was hope to get. 
> >
> >I am using the following binding for step 2:
> ><fb:simple-repeater id="pages" parent-path="/folder" row-path="page" >
> >    <fb:value id="numberCount" path="@number"/>
> ></fb:simple-repeater>
> >
> >If I change row-path="page" to row-path="pageM" then I get 
> ><folder>
> > <page number="1"/>
> > <pageM number="2"/>
> > <pageM number="3"/>
> ></folder>
> >
> >which is more that I need but not perfect.;-)
> >
> >I could use a xsl on the end to clean the mess but I would prefer to do
> >it directly within the binding.
> >
> >Now the question is how can I prevent that the second binding is
> >deleting the first <page/> and still using row-path="page". Is it
> >because I use the fb:simple-repeater and would have to use the
> >fb:repeater instead?
> >
> >Any suggestions?
> >
> >TIA
> >
> >salu2
> >  
> >
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


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