struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Al Sutton" <al.sut...@alsutton.com>
Subject RE: Submit buttons
Date Mon, 31 Dec 2007 08:47:28 GMT
Bingo!

I've changed the name to be btn_%{id} and check for a parameter starting
btn_ using the ParameterNameAware interface.

Thanks Paul.

-----Original Message-----
From: paulus.benedictus@gmail.com [mailto:paulus.benedictus@gmail.com] On
Behalf Of Paul Benedict
Sent: 28 December 2007 20:56
To: Struts Users Mailing List
Subject: Re: Submit buttons

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


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


Mime
View raw message