>From what I can tell you cannot pass extra parameters with the 'method'
attribute

> <s:submit type="button" label="Display"
>    method="display?templateId=%{#status.index}" />

Whatever you specify for method will be taken as the method name.
So it is looking for a method named "display?templateId=0" which is invalid
and not found.
The ?templateId will not be processed as a parameter.

I have asked before; How do you pass a reference id with a submit button so
you can have a column of submit buttons so you can determine which row is
associated with the button pressed?  There doesn't seem to be a way that
doesn't use javascript.

One way is to use onclick and set the id in a hidden field.  LIke this:

<s:hidden name="templateId" value="" />
<s:submit type="button" label="Display" method="display"
   onclick="templateId.value=%{#status.index};"  />

The other way is to use links which you can used to pass parameters but you
can't also pass form fields (unless you use some javascript).

I have thought about extending the DefaultActionMapper to accept a name
parameter with a syntax sorta like:

   name="action:myAction:method:MyMethod:param:name=value"

I think this would be a useful enhancement. (Maybe someone with more time on
there hands will add it.)

Reply via email to