You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Carpels Pascal <Pa...@sycron-it.com> on 2004/08/23 09:33:17 UTC

Remember values Table

Hi all,

I have a table that contains some checkboxes on every row,  I lose all
my values (checkboxes checked) when changing the sorting order.
Is there an event which I can catch, so that I can store these values ? 
Or what is the best way to go ?
The values in the table are a collection of Objects, every object is a
row in my table, so every checkbox is a property of my object. 

Best regards,

Pascal.





Re: Remember values Table

Posted by phillip rhodes <rh...@yahoo.com>.
I display checkboxes in rows and the checkbox property
is persistent (aka "remembered")

Add a boolean property to your bean that is
representing a row.  For example, if you were
displaying orders from a database, add an additional
member variable to your class.

Give it a getter and a setter.

Bind this property to checkbox.  
I am assuming that the rows are pesistent page
properties or in you visit object.

Here is a simple example where I added a property to
my Table object.  

<form jwcid="@Form"
listener="ognl:listeners.formSubmit">						
						<b>Tables</b>
							<input value="Save Tables" jwcid="@Submit" 
								selected="ognl:submitListener" 
								tag="ognl:listeners.editQueryItems"/>
							<input value="Invert Selection" jwcid="@Submit"

								selected="ognl:submitListener" 
								tag="ognl:listeners.invert"/><br></br><p></p>
							<span jwcid="@Foreach" 
								source="ognl:currentQuery.tables" 
								value="ognl:table">
								<input type="checkbox" jwcid="@Checkbox" 
									selected="ognl:table.active" />
								<span jwcid="@Insert" 
									value="ognl:table.displayName"/>
								<br></br>
							</span>
							<br></br>
							<input value="Save Tables" jwcid="@Submit" 
								selected="ognl:submitListener" 
								tag="ognl:listeners.editQueryItems"/>
</form>



--- Carpels Pascal <Pa...@sycron-it.com>
wrote:

> Hi all,
> 
> I have a table that contains some checkboxes on
> every row,  I lose all
> my values (checkboxes checked) when changing the
> sorting order.
> Is there an event which I can catch, so that I can
> store these values ? 
> Or what is the best way to go ?
> The values in the table are a collection of Objects,
> every object is a
> row in my table, so every checkbox is a property of
> my object. 
> 
> Best regards,
> 
> Pascal.
> 
> 
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org