You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Nadja Senoucci <se...@21st.de> on 2003/06/03 14:35:03 UTC
Question about buttons
Hello everyone,
if I want to have a button in my form that would be a second submit button,
can I give it it's own action-class? I guess not, but I thought I'd ask.
Also, how can I check in my form bean which button has been pressed?
The reason why I am asking all of this: I want to have a third button in my
form, next to the general submit and cancel buttons. If that button is
pressed, some extra info is being displayed but the data in the form should
be validated. I thought, it'd be nicer to use a button for this than a
normal link...
Greetings,
Nadja
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Question about buttons
Posted by sjones <sj...@yahoo.com>.
there is also a class called "HTMLButton" that was suggested.
I haven't quite figured it out yet. maybe you will have better luck.
goto: http://j2ee.lagnada.com/struts/html-buttons.htm
"Nadja Senoucci" <se...@21st.de> wrote in message
news:44737.134.100.101.1.1054643703.squirrel@ssl...
> Hello everyone,
>
> if I want to have a button in my form that would be a second submit
button,
> can I give it it's own action-class? I guess not, but I thought I'd ask.
> Also, how can I check in my form bean which button has been pressed?
>
> The reason why I am asking all of this: I want to have a third button in
my
> form, next to the general submit and cancel buttons. If that button is
> pressed, some extra info is being displayed but the data in the form
should
> be validated. I thought, it'd be nicer to use a button for this than a
> normal link...
>
> Greetings,
> Nadja
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Question about buttons
Posted by Nagendra Kumar O V S <na...@ikigo.com>.
hi,
u can obviously give any no of submit buttons with the property name in the
action form. and u can get the value and go accordingly
another intersting feature in struts is that , if u extend ur action class
with DispatchAction (instead of Action) u can implement n number of execute
methods, with a value based on the request parameter.
pl go thro' struts docs u have all the answers to ur questions
--nagi
-------Original Message-------
From: Struts Users Mailing List
Date: Tuesday, June 03, 2003 06:07:12 PM
To: struts-user@jakarta.apache.org
Subject: Question about buttons
Hello everyone,
if I want to have a button in my form that would be a second submit button,
can I give it it's own action-class? I guess not, but I thought I'd ask.
Also, how can I check in my form bean which button has been pressed?
The reason why I am asking all of this: I want to have a third button in my
form, next to the general submit and cancel buttons. If that button is
pressed, some extra info is being displayed but the data in the form should
be validated. I thought, it'd be nicer to use a button for this than a
normal link...
Greetings,
Nadja
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
.
Re: Question about buttons
Posted by Dirk Markert <po...@gmx.de>.
Hello Nadja,
Tuesday, June 3, 2003, 2:35:03 PM, you wrote:
NS> Hello everyone,
NS> if I want to have a button in my form that would be a second submit button,
NS> can I give it it's own action-class? I guess not, but I thought I'd ask.
You cannot. Perhaps you can use a second form with only your button?
NS> Also, how can I check in my form bean which button has been pressed?
Use something like:
<html:submit property="second_submit_button"/>
Your request will contain a parameter named "second_submit_button".
NS> The reason why I am asking all of this: I want to have a third button in my
NS> form, next to the general submit and cancel buttons. If that button is
NS> pressed, some extra info is being displayed but the data in the form should
NS> be validated. I thought, it'd be nicer to use a button for this than a
NS> normal link...
NS> Greetings,
NS> Nadja
NS> ---------------------------------------------------------------------
NS> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
NS> For additional commands, e-mail: struts-user-help@jakarta.apache.org
--
Best regards,
Dirk
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org