cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Katharina Geissler <geissler.ka...@web.de>
Subject using one repeater in two forms
Date Tue, 27 Jul 2004 08:30:40 GMT
Hi there,

i've got the following problem:

I've got two forms, each have got a repeater inside them.  I want the 
initial size of the repeater in the second form to be dependend from  
the number of inserted rows in the first form. For example: User 
inserts two rows in the first form --> the second form automatically 
displays with two rows.

My idea how to solve this problem, was to use just one "big" repeater 
and to display some of the widgets in the first form, and others in the 
second form. I do that, because that way the size of the repeater in 
the second form depends of the number of inserted rows in the first 
form.

For example: User Inserts 2 rows in the first form --> the second form 
will automatically be displayed with 2 rows.

The problem with that is, that I loose the information from the first 
form, when I bind the data of the second form back to my 
backend-data-file.
For example: After binding the data of the first fom, my data-file will 
look like that:

<big_repeater>
	<row>
		<widget1>Some Information</widget1> <!-- This widget is displayed in 
form 1-->
		<widget2/> <!-- this widget will be displayed in form 2-->
	</row>	
	<row>
		<widget1>More Information</widget1>
		<widget2/>
	</row>
</big_repeater>

However, after binding the data of the second form, the data-file will 
look like this:

<big_repeater>
	<row>
		<widget1/>
		<widget2>New Information</widget2>
	</row>	
	<row>
		<widget1/>
		<widget2>More New Information</widget2>
	</row>
</big_repeater>

I know that this is, because the <widget1> isn't displayed in the 
second form + not in the request and therefore cannot be binded back to 
the datafile, but how can I avoid that? Has anyone got an idea?

Or ist this the wrong approach to that problem?

Thanx very much,
Katharina


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


Mime
View raw message