Re: [S2] Passng a parameter with (multiple) Submit buttons

2009-02-02 Thread Musachy Barroso
The only thing I can think of, is extending DefaultActionMapper, extract the id from there, and add it to the mapping params, then plugin your mapper: musachy On Mon, Feb 2, 2009 at 11:48 AM, Greg Lindholm wrote: > > Thanks Jim, but I can't use a link, I need to submit the form as there are a

Re: [S2] Passng a parameter with (multiple) Submit buttons

2009-02-02 Thread Greg Lindholm
Thanks Jim, but I can't use a link, I need to submit the form as there are a bunch of other fields that need to get posted with the request. Jim Kiley wrote: > > How bout: > > > > Delete > > On Mon, Feb 2, 2009 at 11:37 AM, Greg Lindholm > wrote: > >> >> Yes Musachy, that is correct. So

Re: [S2] Passng a parameter with (multiple) Submit buttons

2009-02-02 Thread Jim Kiley
How bout: Delete On Mon, Feb 2, 2009 at 11:37 AM, Greg Lindholm wrote: > > Yes Musachy, that is correct. So is there some struts magic to do this? > > The only way I can think of doing this is to add some javascript to each > button that would set the id as a hidden parameter before doing th

Re: [S2] Passng a parameter with (multiple) Submit buttons

2009-02-02 Thread Greg Lindholm
Yes Musachy, that is correct. So is there some struts magic to do this? The only way I can think of doing this is to add some javascript to each button that would set the id as a hidden parameter before doing the submit. But I would prefer to do this without JS if possible. I guess what I'm th

Re: [S2] Passng a parameter with (multiple) Submit buttons

2009-02-02 Thread Musachy Barroso
What you need to do is pass a different parameter on each submit, not call a different method. musachy On Mon, Feb 2, 2009 at 11:06 AM, Greg Lindholm wrote: > > Thanks Miguel, but that doesn't sound workable with an arbitrary number of > buttons. > > Anyone else? > > I'm looking for a method of

Re: [S2] Passng a parameter with (multiple) Submit buttons

2009-02-02 Thread Greg Lindholm
Thanks Miguel, but that doesn't sound workable with an arbitrary number of buttons. Anyone else? I'm looking for a method of dealing with a table with each row having a "remove" button. I need to pass a different rowId based on which button is clicked so I know which row to remove. I need to us

Re: [S2] Passng a parameter with (multiple) Submit buttons

2009-01-30 Thread Miguel
You can use the method attribute in the s:submit button, combined with a method in your action. You could use the different method invocation as an implicit parameter. You may need to use the action wildcard feature in struts.xml Si quieres ser más positivo, pierde un electrón Miguel Ruiz Velasco

[S2] Passng a parameter with (multiple) Submit buttons

2009-01-30 Thread Greg Lindholm
I have a CRUD action and jsp page for an entity, this entity has a list of attributes. I display these attributes in a table one per row. What I would like to do is have a button on each row of the table so the user can click on the button to remove the attribute. In order to make this work I w