You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "F. Da Costa Gomez" <da...@xsall.nl> on 2003/11/26 15:37:24 UTC

[Foreach] Getting hold of a row created via foreach

Hi,

What is the best way to get a hold of a row in a Foreach generated table 
containing a multitude of checkboxes, editfields etc.

Doing a popup window on a cell is fine as well as inserting a single row 
via a textbox in the tfoot.
Modifying an arbitrary cell though is eluding me. I've looked at the 
contrib:Table and I have got a feeling that the IRowSelectionListener 
has got something to do with it but I don't see how it's working (yet).

I guess rephrasing the question I could ask for the best way to get hold 
of a cell.

If some code would be required plz let me know (I'll strip some).

TIA,
Fermin DCG


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


Re: [Foreach] Getting hold of a row created via foreach

Posted by "Kevin C. Dorff" <kd...@dorffweb.com>.
To me, even you clarified version of your question isn't very clarified. 
You talk about Foreach and you talk about using the Table... I am not 
sure what you are asking.

You ask "best way to get hold of a cell" but I don't know what you MEAN 
by that.

If I can make a wild guess, I would say you have a dataset, which might 
be something like an ArrayList of objects, lets say an ArrayList of 
Customer objects, where each row represents a single Customer object. 
Each row is made up of columns which are the properties of the Customer 
object, one column might be LastName, one might be FirstName. I am 
assuming what you want is the individual cells to be editable, via, say 
a TextField or a PropertySelection or the like.

The application user is presented with this grid, can make changes as 
appropriate to any of the users, and the changes can then be saved back 
to the database (by clicking a submit button).

If this is what you are desiring, you need to look at the ListEdit 
component with the associated ListEditMap object. An example of this can 
be found in the Vlib application (included with the Tapestry source 
distribution) on the EditPublishers page. This was the model I used when 
I added this functionality to my app.

If you are asking for something completely different, you will need to 
be a little more specific about what you need.

Kevin

F. Da Costa Gomez wrote:

> Hi,
>
> What is the best way to get a hold of a row in a Foreach generated 
> table containing a multitude of checkboxes, editfields etc.
>
> Doing a popup window on a cell is fine as well as inserting a single 
> row via a textbox in the tfoot.
> Modifying an arbitrary cell though is eluding me. I've looked at the 
> contrib:Table and I have got a feeling that the IRowSelectionListener 
> has got something to do with it but I don't see how it's working (yet).
>
> I guess rephrasing the question I could ask for the best way to get 
> hold of a cell.
>
> If some code would be required plz let me know (I'll strip some).
>
> TIA,
> Fermin DCG
>
>
> ---------------------------------------------------------------------
> 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