tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nalin Gupta" <Nalin.Gu...@macquarie.com>
Subject Contrib:table and with editable form
Date Tue, 02 Jan 2007 05:01:07 GMT
Hi ,
I am having an issue with a table within a form. I have a checkbox that
I use in every table row , however the field associated to the checkbox
does not remember whether it was checked or not in the listener method.
I am not sure why. I have tried various approaches , including setting
the orignal "source" List to Persist("session"), storing it in the Visit

I have looked through John Reynold's wonderful tutorial from
n_1.html and have pretty much followed the examples given (although I
have modified it to use annotations and Tapestry 4.1 )

Maybe I am missing something obvious in the page lifecycle ?

Software : 
Tapestry 4.1.2-SNAPSHOT
Tomcat 5.0
JDK 1.5.0_07
I am using the contrib:table component to display the table and the
source contains a list of "Entity" objects :
Page class :
 public abstract void setResultingEntities(List<Entity> entities);
 public abstract List<Entity> getResultingEntities();
	/* Listener method. */
 	public ILink deleteEntity(IRequestCycle cycle) {
		// process the list
		List<Entity> list = getResultingEntities();
		System.out.println("getResultingEntities size is
		for (Entity object : list) {
			System.out.println("checking " + object.getRid()
+ "--" + object.isDeleteReady() + "--"
					+ object.getEntityName());
			if (object.isDeleteReady()) {
				System.out.println("*** RID " +
object.getRid() + " is ready to be deleted !!!");
		// return Page ....


Page HTML:
<form jwcid="@Form" listener="ognl:listeners.deleteEntity">
<table class="mytable"
pageSize="50" >
<span jwcid="checkColumnValue@Block">
<span jwcid="toDelete@Checkbox"
<span jwcid="@Submit" protect="true" value="Delete Entity"
class="formfieldbtn" />


The deleteReady field is a boolean in the "Entity" class. I am expected
this to be set to true when the checkbox is checked and the submit
button pressed.

Thanks in advance for your help,

This e-mail and any attachments are confidential and may contain copyright material of Macquarie
Bank or third parties. If you are not the intended recipient of this email you should not
read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and
should destroy all copies of them. Macquarie Bank does not guarantee the integrity of any
emails or any attached files. The views or opinions expressed are the author's own and may
not reflect the views or opinions of Macquarie Bank.

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

View raw message