You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Eric Williams <er...@sandiego.com> on 2005/03/01 20:03:55 UTC

Using submit controls with parameters in a table

I have a question about using LinkSubmit from within a contrib:Table. Here's
the situation:

I have a form that manages both a parent object and its children. These
child objects are listed and editable via a table including TableFormRows
and TableFormPages. Everything works great, except one aspect: Each row of
the table has a link to delete the child object. Previously, I had a
DirectLink here, with a parameter indicating the ID of the child to delete.
The only problem is this bypasses form submission, so that if I make a
change to the parent object and then hit "delete" on a child, my parent
object is not updated.

To deal with this I've replaced my DirectLink with LinkSubmit, and the
parent is getting updated properly. The trouble with this solution, though,
is that I cannot provide LinkSubmit a parameter like I can with DirectLink.
In order to determine which child the user wants to delete I've resorted to
shoving its ID in the "tag" parameter, which seems a bit clumsy.

Is there a better way to do this that I'm just not seeing? I assume this
issue would involve any type of submit control within a table, where
behavior should be dependant on the contents of the row.

Thanks in advance for any help you can provide...

Regards,
	Eric

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