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 S.



On Fri, Jan 30, 2009 at 15:54, Greg Lindholm <glindh...@yahoo.com> wrote:
> 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 <s:submit action="removeAttr"/> 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 would need to pass the id of the attribute with 
> the submit button and I can't find a way to do this.
>
> Is there a (struts) way to pass a parameter with a submit button?
>
> I can't use a link because I need all the other form fields to be posted with 
> the request.
>
> The only way I can think of making this work is to add some javascript to 
> each button that would set the id in a hidden field before the submit. Is 
> there a pure struts or better way to do this?
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to