You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Hendrickson, Jacob" <ja...@etrade.com> on 2004/10/30 00:26:38 UTC

Adding checkboxes to a Table component

I'm just getting started with Tapestry, and I'm stuck on something that seems like it should be simple. I'm working on a page that will serve as an interface to a SOAP service (already deployed).

The idea is to first call a "browse" method, which returns a set of rows, and then allow selection of those rows via checkboxes, so that on a second submit I can call a "delete" method on the selected rows. So I have a form with 2 submit buttons, and 2 listener methods.

I could implement this using a basic HTML table, and a @Foreach to output the rows, but I'd like to use the contrib:Table component, because it provides paging and sorting.  

The "browse" method of the SOAP service returns an array of beans, and I've  set up a Table component that uses the array to populate the rows. But I haven't been able to add a column of checkboxes.

I tried copying some sample code which rendered one column using text input fields, with the field tied to one of the bean's properties. This is close to what I need to do --  the problem I've run into is that the bean class has no boolean property that can correspond to the checkbox input field.

Any suggestions would be much appreciated.


--
--

Jacob Hendrickson
Software Engineer
E*Trade Financial

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


RE: Adding checkboxes to a Table component

Posted by John Reynolds <jo...@austin.rr.com>.
You could always hide your bean behind a fascade object that does have a
boolean property, or you could create your own structure for keeping
track... The example table in the workbench local selector does this.

-----Original Message-----
From: Hendrickson, Jacob [mailto:jacob.hendrickson@etrade.com] 
Sent: Friday, October 29, 2004 5:27 PM
To: tapestry-user@jakarta.apache.org
Subject: Adding checkboxes to a Table component



I'm just getting started with Tapestry, and I'm stuck on something that
seems like it should be simple. I'm working on a page that will serve as
an interface to a SOAP service (already deployed).

The idea is to first call a "browse" method, which returns a set of
rows, and then allow selection of those rows via checkboxes, so that on
a second submit I can call a "delete" method on the selected rows. So I
have a form with 2 submit buttons, and 2 listener methods.

I could implement this using a basic HTML table, and a @Foreach to
output the rows, but I'd like to use the contrib:Table component,
because it provides paging and sorting.  

The "browse" method of the SOAP service returns an array of beans, and
I've  set up a Table component that uses the array to populate the rows.
But I haven't been able to add a column of checkboxes.

I tried copying some sample code which rendered one column using text
input fields, with the field tied to one of the bean's properties. This
is close to what I need to do --  the problem I've run into is that the
bean class has no boolean property that can correspond to the checkbox
input field.

Any suggestions would be much appreciated.


--
--

Jacob Hendrickson
Software Engineer
E*Trade Financial

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


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