struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Benedict" <pbened...@apache.org>
Subject Re: Submit buttons
Date Fri, 28 Dec 2007 20:55:56 GMT
The name of the button is what gets submitted. The value, I believe, is the
user display value which doesn't get sent in the submission.

On Dec 28, 2007 12:43 PM, Al Sutton <al.sutton@alsutton.com> wrote:

> I've been bashing my head against a brick wall on this one so maybe
> someone
> can help ease the pain...
>
>
> Within a single form I have several buttons. Each button has an ID
> associated with it and a name. What I would like to do is show the name to
> the user and submit the ID to my action when it's clicked. IE is the
> browser
> of choice here, so please don't offer any
> Opera/FireFox/Safari/etc./etc./etc. specific work arounds because the
> people
> I'm demonstrating this to are an IE house.
>
> Any ideas?
>
> Al
>
> For those interested I've already tried;
>
> <s:iterator value="formDetails.buttons">
>  <s:submit type="button" name="buttonId" value="%{id}"
> cssStyle="width:150px"><s:property value="%{name}"/></s:submit>
> </s:iterator>
>
> but that just submits the button name.
>
> I've tried;
>
> <s:iterator value="formDetails.buttons">
>  <s:submit type="button" label="%{name}" name="buttonId" value="%{id}"
> cssStyle="width:150px"/>
> </s:iterator>
>
> but that has the same result :(.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message