You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by struts lover <st...@yahoo.com> on 2004/10/05 16:12:53 UTC
multiple submit buttons on a form
Hello Everyone,
I have this problem. I have several submit buttons on
a form and I am using a modified version of
LookupDispatchAction class.
Is there any way for the buttons to have the same
name instead of having separate names as required by
LookupDispatchAction. I also want internationalization
to be taken care of.
Any help would be appreciated.
Thanks.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: multiple submit buttons on a form
Posted by struts lover <st...@yahoo.com>.
Thanks Michael very much. I will go through it. If I
dont understand anything, will come back :).
Thanks again.
--- Michael McGrady <mi...@michaelmcgrady.com> wrote:
> Lucky you, Struts Lover, this has already been done.
> See
>
http://wiki.apache.org/struts/StrutsCatalogVariousButtonSolutions
> . You
> can get everything you want without the incredibly
> heavy load of having
> LookupDispatchAction create a reverse map of your
> entire
> ApplicationResource.properties file. With the
> solutions in this
> reference, the name values for (new) DispatchAction
> are completely
> decoupled from the dispatch functionality, leaving
> you free to do
> whatever you want to do with the names, and without
> configuring
> struts-config.xml. What more could you ask? LOL
>
> Michael McGrady
>
> struts lover wrote:
>
> >Hello Everyone,
> >I have this problem. I have several submit buttons
> on
> >a form and I am using a modified version of
> >LookupDispatchAction class.
> >
> >Is there any way for the buttons to have the same
> >name instead of having separate names as required
> by
> >LookupDispatchAction. I also want
> internationalization
> >to be taken care of.
> >
> >Any help would be appreciated.
> >
> >Thanks.
> >
> >__________________________________________________
> >Do You Yahoo!?
> >Tired of spam? Yahoo! Mail has the best spam
> protection around
> >http://mail.yahoo.com
> >
>
>---------------------------------------------------------------------
> >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
>
>
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: multiple submit buttons on a form
Posted by Michael McGrady <mi...@michaelmcgrady.com>.
Lucky you, Struts Lover, this has already been done. See
http://wiki.apache.org/struts/StrutsCatalogVariousButtonSolutions . You
can get everything you want without the incredibly heavy load of having
LookupDispatchAction create a reverse map of your entire
ApplicationResource.properties file. With the solutions in this
reference, the name values for (new) DispatchAction are completely
decoupled from the dispatch functionality, leaving you free to do
whatever you want to do with the names, and without configuring
struts-config.xml. What more could you ask? LOL
Michael McGrady
struts lover wrote:
>Hello Everyone,
>I have this problem. I have several submit buttons on
>a form and I am using a modified version of
>LookupDispatchAction class.
>
>Is there any way for the buttons to have the same
>name instead of having separate names as required by
>LookupDispatchAction. I also want internationalization
>to be taken care of.
>
>Any help would be appreciated.
>
>Thanks.
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam? Yahoo! Mail has the best spam protection around
>http://mail.yahoo.com
>
>---------------------------------------------------------------------
>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
Re: multiple submit buttons on a form
Posted by Michael McGrady <mi...@michaelmcgrady.com>.
Rick Reumann wrote:
> Michael McGrady wrote the following on 10/5/2004 1:40 PM:
>
>> He cannot use a basic DispatchAction, Rick, since he wants to use
>> multiple buttons. He needs multiple buttons with the same value.
>> Since the value of the name parameter in the HTML is completely
>> decoupled from all of my solutions, he is free to do that with all
>> the solutions.
>
>
> Well, you shouldn't say "Can't" since I do it all the time with
> javascript. A simple onClick="yourForm.dispatch.value='whatever'" does
> the trick for me on any of my buttons. (Granted yours is nice and
> clean since it avoids the need for the hidden dispatch param and
> javascript.)
>
Rick,
/mea culpa, mea maxima culpa/. I knew that too. Sorry! I am going to
put that solution up on my page too within the next few days. I too
often forget about the JavaScript thing when I am thinking about
solutions. My first engineering job involved never talking about
JavaScript. It was DEATH! LOL
Michael McGrady
Re: multiple submit buttons on a form
Posted by Rick Reumann <st...@reumann.net>.
Michael McGrady wrote the following on 10/5/2004 1:40 PM:
> He cannot use a basic DispatchAction, Rick, since he wants to use
> multiple buttons. He needs multiple buttons with the same value. Since
> the value of the name parameter in the HTML is completely decoupled from
> all of my solutions, he is free to do that with all the solutions.
Well, you shouldn't say "Can't" since I do it all the time with
javascript. A simple onClick="yourForm.dispatch.value='whatever'" does
the trick for me on any of my buttons. (Granted yours is nice and clean
since it avoids the need for the hidden dispatch param and javascript.)
--
Rick
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: multiple submit buttons on a form
Posted by Michael McGrady <mi...@michaelmcgrady.com>.
Rick Reumann wrote:
> struts lover wrote the following on 10/5/2004 10:12 AM:
>
>> I have this problem. I have several submit buttons on
>> a form and I am using a modified version of
>> LookupDispatchAction class.
>> Is there any way for the buttons to have the same
>> name instead of having separate names as required by
>> LookupDispatchAction. I also want internationalization
>> to be taken care of.
>
>
> Answer: Don't use the LookupDispatchAction:) Much more trouble than
> it's worth. Use one of Michael's solutions (which are great for
> multiple button forms) or simply use a basic DispatchAction.
>
He cannot use a basic DispatchAction, Rick, since he wants to use
multiple buttons. He needs multiple buttons with the same value. Since
the value of the name parameter in the HTML is completely decoupled from
all of my solutions, he is free to do that with all the solutions.
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: multiple submit buttons on a form
Posted by Rick Reumann <st...@reumann.net>.
struts lover wrote the following on 10/5/2004 10:12 AM:
> I have this problem. I have several submit buttons on
> a form and I am using a modified version of
> LookupDispatchAction class.
>
> Is there any way for the buttons to have the same
> name instead of having separate names as required by
> LookupDispatchAction. I also want internationalization
> to be taken care of.
Answer: Don't use the LookupDispatchAction:) Much more trouble than it's
worth. Use one of Michael's solutions (which are great for multiple
button forms) or simply use a basic DispatchAction.
--
Rick
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: multiple submit buttons on a form
Posted by Michael McGrady <mi...@michaelmcgrady.com>.
struts lover wrote:
>Hello Everyone,
>I have this problem. I have several submit buttons on
>a form and I am using a modified version of
>LookupDispatchAction class.
>
>Is there any way for the buttons to have the same
>name instead of having separate names as required by
>LookupDispatchAction. I also want internationalization
>to be taken care of.
>
>Any help would be appreciated.
>
>Thanks.
>
I assume, Struts Lover, you see that you just use the lovely Struts
<bean:message key='SUBMIT'/> for the values in order to Internationalize
the solution with the solutions I sent you to. Michael McGrady
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org