You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Leticia Golubov <lg...@micromuse.com> on 2004/04/27 16:42:05 UTC
Multiple Actions
My page has 2 buttons in one form. One is the 'start' button, another one is
a 'refresh' button.
I use <html:image> (wouldn't mind using <html:img>, but couldn't set a value
for my property with that tag) tag for the buttons. I was wondering how I
could get my action to determine which button was clicked and have the
forward subsequently use the right method in my action?
I've tried this:
<td><html:image page="../../images/button_toolbar_refresh.png"
border="0" alt="Refresh"
property="mode"
value="refresh"
onclick="myForm.submit();"
onmouseover="javascript:SwapImage
('refresh','../../images/button_toolbar_refresh_over.png');
SetStatus('Refresh'); return true;"
onmouseout="javascript:SwapImage
'refresh','../../images/button_toolbar_refresh.png'); SetStatus(''); return
true;"
onmousedown="javascript:SwapImage
'refresh','../../images/button_toolbar_refresh_click.png');"
onmouseup="javascript:SwapImage('refresh','../../images/button_toolbar_refre
sh_over.png');" />
</td>
that will submit the action, but won't set the value...
please help?!
===========================================
Leticia Golubov
Precision Developer
Micromuse Ltd.
Disraeli House
90 Putney Bridge Road
London, SW18 1DA
Tel: +44 (0) 20 8875 9500 ext: 290
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone
else is
unauthorised.
If you are not the intended recipient delete
it from your system. Any unauthorised
disclosure, copying, distribution or action
taken in reliance on this message is
prohibited and my be unlawful.
============================================
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Multiple Actions
Posted by de...@wachovia.com.
I can't say with certainty, but I believe it does.
Dennis Graham
Michael McGrady <mi...@michaelmcgrady.com>
04/28/2004 08:03 AM
Please respond to "Struts Users Mailing List"
To: "Struts Users Mailing List" <us...@struts.apache.org>
cc:
Subject: Re: Multiple Actions
Does this solution work for multiple image buttons? I am a bit confused
about this. I am just getting into a solution for this problem, because I
am ready to put the skin on an application I have worked on for some
time. When I get this end of the puzzle done, I have a generically cool
solution to the whole image display problem in Struts which I will
share. I like this solution and think something similar by Ted Husted
might be the way to go too:
http://www.jguru.com/faq/view.jsp?EID=543699. But, I am not sure exactly
how Ted's idea pans out in an actual use case either. I really do best by
one simple page that works and I can figure out the theory from there.
Michael McGrady
At 07:45 AM 4/27/2004, dennis.graham@wachovia.com wrote:
>I used the following solution:
>http://j2ee.lagnada.com/struts/html-buttons.htm
>
>Dennis Graham
>
>
>
>
>
>
>"Leticia Golubov" <lg...@micromuse.com>
>04/27/2004 10:42 AM
>Please respond to "Struts Users Mailing List"
>
> To: "Struts User Mailing List"
><st...@jakarta.apache.org>
> cc:
> Subject: Multiple Actions
>
>
>My page has 2 buttons in one form. One is the 'start' button, another one
>is
>a 'refresh' button.
>
>I use <html:image> (wouldn't mind using <html:img>, but couldn't set a
>value
>for my property with that tag) tag for the buttons. I was wondering how I
>could get my action to determine which button was clicked and have the
>forward subsequently use the right method in my action?
>
>I've tried this:
>
><td><html:image page="../../images/button_toolbar_refresh.png"
> border="0" alt="Refresh"
> property="mode"
> value="refresh"
> onclick="myForm.submit();"
> onmouseover="javascript:SwapImage
>('refresh','../../images/button_toolbar_refresh_over.png');
>SetStatus('Refresh'); return true;"
> onmouseout="javascript:SwapImage
>'refresh','../../images/button_toolbar_refresh.png'); SetStatus('');
>return
>true;"
> onmousedown="javascript:SwapImage
>'refresh','../../images/button_toolbar_refresh_click.png');"
>
>onmouseup="
>javascript:SwapImage('refresh','../../images/button_toolbar_refre
>sh_over.png');" />
></td>
>
>that will submit the action, but won't set the value...
>
>please help?!
>
>===========================================
>Leticia Golubov
>Precision Developer
>Micromuse Ltd.
>Disraeli House
>90 Putney Bridge Road
>London, SW18 1DA
>Tel: +44 (0) 20 8875 9500 ext: 290
>
>The information in this email is confidential and may be legally
>privileged.
>It is intended solely for the addressee. Access to this email by anyone
>else is
>unauthorised.
>
>If you are not the intended recipient delete
>it from your system. Any unauthorised
>disclosure, copying, distribution or action
>taken in reliance on this message is
>prohibited and my be unlawful.
>============================================
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
Re: Multiple Actions
Posted by Michael McGrady <mi...@michaelmcgrady.com>.
Does this solution work for multiple image buttons? I am a bit confused
about this. I am just getting into a solution for this problem, because I
am ready to put the skin on an application I have worked on for some
time. When I get this end of the puzzle done, I have a generically cool
solution to the whole image display problem in Struts which I will
share. I like this solution and think something similar by Ted Husted
might be the way to go too:
http://www.jguru.com/faq/view.jsp?EID=543699. But, I am not sure exactly
how Ted's idea pans out in an actual use case either. I really do best by
one simple page that works and I can figure out the theory from there.
Michael McGrady
At 07:45 AM 4/27/2004, dennis.graham@wachovia.com wrote:
>I used the following solution:
>http://j2ee.lagnada.com/struts/html-buttons.htm
>
>Dennis Graham
>
>
>
>
>
>
>"Leticia Golubov" <lg...@micromuse.com>
>04/27/2004 10:42 AM
>Please respond to "Struts Users Mailing List"
>
> To: "Struts User Mailing List"
><st...@jakarta.apache.org>
> cc:
> Subject: Multiple Actions
>
>
>My page has 2 buttons in one form. One is the 'start' button, another one
>is
>a 'refresh' button.
>
>I use <html:image> (wouldn't mind using <html:img>, but couldn't set a
>value
>for my property with that tag) tag for the buttons. I was wondering how I
>could get my action to determine which button was clicked and have the
>forward subsequently use the right method in my action?
>
>I've tried this:
>
><td><html:image page="../../images/button_toolbar_refresh.png"
> border="0" alt="Refresh"
> property="mode"
> value="refresh"
> onclick="myForm.submit();"
> onmouseover="javascript:SwapImage
>('refresh','../../images/button_toolbar_refresh_over.png');
>SetStatus('Refresh'); return true;"
> onmouseout="javascript:SwapImage
>'refresh','../../images/button_toolbar_refresh.png'); SetStatus('');
>return
>true;"
> onmousedown="javascript:SwapImage
>'refresh','../../images/button_toolbar_refresh_click.png');"
>
>onmouseup="
>javascript:SwapImage('refresh','../../images/button_toolbar_refre
>sh_over.png');" />
></td>
>
>that will submit the action, but won't set the value...
>
>please help?!
>
>===========================================
>Leticia Golubov
>Precision Developer
>Micromuse Ltd.
>Disraeli House
>90 Putney Bridge Road
>London, SW18 1DA
>Tel: +44 (0) 20 8875 9500 ext: 290
>
>The information in this email is confidential and may be legally
>privileged.
>It is intended solely for the addressee. Access to this email by anyone
>else is
>unauthorised.
>
>If you are not the intended recipient delete
>it from your system. Any unauthorised
>disclosure, copying, distribution or action
>taken in reliance on this message is
>prohibited and my be unlawful.
>============================================
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
RE: Multiple Actions
Posted by Leticia Golubov <lg...@micromuse.com>.
Well, one of The Men... No offence to the others ;)
-----Original Message-----
From: Leticia Golubov [mailto:lgolubov@micromuse.com]
Sent: 27 April 2004 16:06
To: Struts Users Mailing List
Subject: RE: Multiple Actions
mmm, maybe you're right, also found this written by The Man himself:
http://husted.com/struts/tips/001.html
Thanks Dennis
-----Original Message-----
From: dennis.graham@wachovia.com [mailto:dennis.graham@wachovia.com]
Sent: 27 April 2004 15:57
To: Struts Users Mailing List
Subject: RE: Multiple Actions
Interesting, I had the same problem last week (how to solve multiple
actions from buttons) and found this site. Took a look and dismissed it
as overly complex. Spent 30 minutes looking for another solution and
couldn't find anything. So, went back to lagnada.
Followed the steps, looked at the examples, spent another 30 minutes and I
was done.
Dennis Graham
"Leticia Golubov" <lg...@micromuse.com>
04/27/2004 10:52 AM
Please respond to "Struts Users Mailing List"
To: "Struts Users Mailing List" <us...@struts.apache.org>
cc: "Struts User Mailing List"
<st...@jakarta.apache.org>
Subject: RE: Multiple Actions
Yes, I saw that... I was hoping there was a more straight forward way? :(
-----Original Message-----
From: dennis.graham@wachovia.com [mailto:dennis.graham@wachovia.com]
Sent: 27 April 2004 15:45
To: Struts Users Mailing List
Cc: Struts User Mailing List
Subject: Re: Multiple Actions
I used the following solution:
http://j2ee.lagnada.com/struts/html-buttons.htm
Dennis Graham
"Leticia Golubov" <lg...@micromuse.com>
04/27/2004 10:42 AM
Please respond to "Struts Users Mailing List"
To: "Struts User Mailing List"
<st...@jakarta.apache.org>
cc:
Subject: Multiple Actions
My page has 2 buttons in one form. One is the 'start' button, another one
is
a 'refresh' button.
I use <html:image> (wouldn't mind using <html:img>, but couldn't set a
value
for my property with that tag) tag for the buttons. I was wondering how I
could get my action to determine which button was clicked and have the
forward subsequently use the right method in my action?
I've tried this:
<td><html:image page="../../images/button_toolbar_refresh.png"
border="0" alt="Refresh"
property="mode"
value="refresh"
onclick="myForm.submit();"
onmouseover="javascript:SwapImage
('refresh','../../images/button_toolbar_refresh_over.png');
SetStatus('Refresh'); return true;"
onmouseout="javascript:SwapImage
'refresh','../../images/button_toolbar_refresh.png'); SetStatus('');
return
true;"
onmousedown="javascript:SwapImage
'refresh','../../images/button_toolbar_refresh_click.png');"
onmouseup="
javascript:SwapImage('refresh','../../images/button_toolbar_refre
sh_over.png');" />
</td>
that will submit the action, but won't set the value...
please help?!
===========================================
Leticia Golubov
Precision Developer
Micromuse Ltd.
Disraeli House
90 Putney Bridge Road
London, SW18 1DA
Tel: +44 (0) 20 8875 9500 ext: 290
The information in this email is confidential and may be legally
privileged.
It is intended solely for the addressee. Access to this email by anyone
else is
unauthorised.
If you are not the intended recipient delete
it from your system. Any unauthorised
disclosure, copying, distribution or action
taken in reliance on this message is
prohibited and my be unlawful.
============================================
---------------------------------------------------------------------
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
---------------------------------------------------------------------
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 Actions
Posted by Leticia Golubov <lg...@micromuse.com>.
mmm, maybe you're right, also found this written by The Man himself:
http://husted.com/struts/tips/001.html
Thanks Dennis
-----Original Message-----
From: dennis.graham@wachovia.com [mailto:dennis.graham@wachovia.com]
Sent: 27 April 2004 15:57
To: Struts Users Mailing List
Subject: RE: Multiple Actions
Interesting, I had the same problem last week (how to solve multiple
actions from buttons) and found this site. Took a look and dismissed it
as overly complex. Spent 30 minutes looking for another solution and
couldn't find anything. So, went back to lagnada.
Followed the steps, looked at the examples, spent another 30 minutes and I
was done.
Dennis Graham
"Leticia Golubov" <lg...@micromuse.com>
04/27/2004 10:52 AM
Please respond to "Struts Users Mailing List"
To: "Struts Users Mailing List" <us...@struts.apache.org>
cc: "Struts User Mailing List"
<st...@jakarta.apache.org>
Subject: RE: Multiple Actions
Yes, I saw that... I was hoping there was a more straight forward way? :(
-----Original Message-----
From: dennis.graham@wachovia.com [mailto:dennis.graham@wachovia.com]
Sent: 27 April 2004 15:45
To: Struts Users Mailing List
Cc: Struts User Mailing List
Subject: Re: Multiple Actions
I used the following solution:
http://j2ee.lagnada.com/struts/html-buttons.htm
Dennis Graham
"Leticia Golubov" <lg...@micromuse.com>
04/27/2004 10:42 AM
Please respond to "Struts Users Mailing List"
To: "Struts User Mailing List"
<st...@jakarta.apache.org>
cc:
Subject: Multiple Actions
My page has 2 buttons in one form. One is the 'start' button, another one
is
a 'refresh' button.
I use <html:image> (wouldn't mind using <html:img>, but couldn't set a
value
for my property with that tag) tag for the buttons. I was wondering how I
could get my action to determine which button was clicked and have the
forward subsequently use the right method in my action?
I've tried this:
<td><html:image page="../../images/button_toolbar_refresh.png"
border="0" alt="Refresh"
property="mode"
value="refresh"
onclick="myForm.submit();"
onmouseover="javascript:SwapImage
('refresh','../../images/button_toolbar_refresh_over.png');
SetStatus('Refresh'); return true;"
onmouseout="javascript:SwapImage
'refresh','../../images/button_toolbar_refresh.png'); SetStatus('');
return
true;"
onmousedown="javascript:SwapImage
'refresh','../../images/button_toolbar_refresh_click.png');"
onmouseup="
javascript:SwapImage('refresh','../../images/button_toolbar_refre
sh_over.png');" />
</td>
that will submit the action, but won't set the value...
please help?!
===========================================
Leticia Golubov
Precision Developer
Micromuse Ltd.
Disraeli House
90 Putney Bridge Road
London, SW18 1DA
Tel: +44 (0) 20 8875 9500 ext: 290
The information in this email is confidential and may be legally
privileged.
It is intended solely for the addressee. Access to this email by anyone
else is
unauthorised.
If you are not the intended recipient delete
it from your system. Any unauthorised
disclosure, copying, distribution or action
taken in reliance on this message is
prohibited and my be unlawful.
============================================
---------------------------------------------------------------------
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
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Multiple Actions
Posted by de...@wachovia.com.
Interesting, I had the same problem last week (how to solve multiple
actions from buttons) and found this site. Took a look and dismissed it
as overly complex. Spent 30 minutes looking for another solution and
couldn't find anything. So, went back to lagnada.
Followed the steps, looked at the examples, spent another 30 minutes and I
was done.
Dennis Graham
"Leticia Golubov" <lg...@micromuse.com>
04/27/2004 10:52 AM
Please respond to "Struts Users Mailing List"
To: "Struts Users Mailing List" <us...@struts.apache.org>
cc: "Struts User Mailing List"
<st...@jakarta.apache.org>
Subject: RE: Multiple Actions
Yes, I saw that... I was hoping there was a more straight forward way? :(
-----Original Message-----
From: dennis.graham@wachovia.com [mailto:dennis.graham@wachovia.com]
Sent: 27 April 2004 15:45
To: Struts Users Mailing List
Cc: Struts User Mailing List
Subject: Re: Multiple Actions
I used the following solution:
http://j2ee.lagnada.com/struts/html-buttons.htm
Dennis Graham
"Leticia Golubov" <lg...@micromuse.com>
04/27/2004 10:42 AM
Please respond to "Struts Users Mailing List"
To: "Struts User Mailing List"
<st...@jakarta.apache.org>
cc:
Subject: Multiple Actions
My page has 2 buttons in one form. One is the 'start' button, another one
is
a 'refresh' button.
I use <html:image> (wouldn't mind using <html:img>, but couldn't set a
value
for my property with that tag) tag for the buttons. I was wondering how I
could get my action to determine which button was clicked and have the
forward subsequently use the right method in my action?
I've tried this:
<td><html:image page="../../images/button_toolbar_refresh.png"
border="0" alt="Refresh"
property="mode"
value="refresh"
onclick="myForm.submit();"
onmouseover="javascript:SwapImage
('refresh','../../images/button_toolbar_refresh_over.png');
SetStatus('Refresh'); return true;"
onmouseout="javascript:SwapImage
'refresh','../../images/button_toolbar_refresh.png'); SetStatus('');
return
true;"
onmousedown="javascript:SwapImage
'refresh','../../images/button_toolbar_refresh_click.png');"
onmouseup="
javascript:SwapImage('refresh','../../images/button_toolbar_refre
sh_over.png');" />
</td>
that will submit the action, but won't set the value...
please help?!
===========================================
Leticia Golubov
Precision Developer
Micromuse Ltd.
Disraeli House
90 Putney Bridge Road
London, SW18 1DA
Tel: +44 (0) 20 8875 9500 ext: 290
The information in this email is confidential and may be legally
privileged.
It is intended solely for the addressee. Access to this email by anyone
else is
unauthorised.
If you are not the intended recipient delete
it from your system. Any unauthorised
disclosure, copying, distribution or action
taken in reliance on this message is
prohibited and my be unlawful.
============================================
---------------------------------------------------------------------
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 Actions
Posted by Leticia Golubov <lg...@micromuse.com>.
Yes, I saw that... I was hoping there was a more straight forward way? :(
-----Original Message-----
From: dennis.graham@wachovia.com [mailto:dennis.graham@wachovia.com]
Sent: 27 April 2004 15:45
To: Struts Users Mailing List
Cc: Struts User Mailing List
Subject: Re: Multiple Actions
I used the following solution:
http://j2ee.lagnada.com/struts/html-buttons.htm
Dennis Graham
"Leticia Golubov" <lg...@micromuse.com>
04/27/2004 10:42 AM
Please respond to "Struts Users Mailing List"
To: "Struts User Mailing List"
<st...@jakarta.apache.org>
cc:
Subject: Multiple Actions
My page has 2 buttons in one form. One is the 'start' button, another one
is
a 'refresh' button.
I use <html:image> (wouldn't mind using <html:img>, but couldn't set a
value
for my property with that tag) tag for the buttons. I was wondering how I
could get my action to determine which button was clicked and have the
forward subsequently use the right method in my action?
I've tried this:
<td><html:image page="../../images/button_toolbar_refresh.png"
border="0" alt="Refresh"
property="mode"
value="refresh"
onclick="myForm.submit();"
onmouseover="javascript:SwapImage
('refresh','../../images/button_toolbar_refresh_over.png');
SetStatus('Refresh'); return true;"
onmouseout="javascript:SwapImage
'refresh','../../images/button_toolbar_refresh.png'); SetStatus('');
return
true;"
onmousedown="javascript:SwapImage
'refresh','../../images/button_toolbar_refresh_click.png');"
onmouseup="
javascript:SwapImage('refresh','../../images/button_toolbar_refre
sh_over.png');" />
</td>
that will submit the action, but won't set the value...
please help?!
===========================================
Leticia Golubov
Precision Developer
Micromuse Ltd.
Disraeli House
90 Putney Bridge Road
London, SW18 1DA
Tel: +44 (0) 20 8875 9500 ext: 290
The information in this email is confidential and may be legally
privileged.
It is intended solely for the addressee. Access to this email by anyone
else is
unauthorised.
If you are not the intended recipient delete
it from your system. Any unauthorised
disclosure, copying, distribution or action
taken in reliance on this message is
prohibited and my be unlawful.
============================================
---------------------------------------------------------------------
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 Actions
Posted by de...@wachovia.com.
I used the following solution:
http://j2ee.lagnada.com/struts/html-buttons.htm
Dennis Graham
"Leticia Golubov" <lg...@micromuse.com>
04/27/2004 10:42 AM
Please respond to "Struts Users Mailing List"
To: "Struts User Mailing List"
<st...@jakarta.apache.org>
cc:
Subject: Multiple Actions
My page has 2 buttons in one form. One is the 'start' button, another one
is
a 'refresh' button.
I use <html:image> (wouldn't mind using <html:img>, but couldn't set a
value
for my property with that tag) tag for the buttons. I was wondering how I
could get my action to determine which button was clicked and have the
forward subsequently use the right method in my action?
I've tried this:
<td><html:image page="../../images/button_toolbar_refresh.png"
border="0" alt="Refresh"
property="mode"
value="refresh"
onclick="myForm.submit();"
onmouseover="javascript:SwapImage
('refresh','../../images/button_toolbar_refresh_over.png');
SetStatus('Refresh'); return true;"
onmouseout="javascript:SwapImage
'refresh','../../images/button_toolbar_refresh.png'); SetStatus('');
return
true;"
onmousedown="javascript:SwapImage
'refresh','../../images/button_toolbar_refresh_click.png');"
onmouseup="
javascript:SwapImage('refresh','../../images/button_toolbar_refre
sh_over.png');" />
</td>
that will submit the action, but won't set the value...
please help?!
===========================================
Leticia Golubov
Precision Developer
Micromuse Ltd.
Disraeli House
90 Putney Bridge Road
London, SW18 1DA
Tel: +44 (0) 20 8875 9500 ext: 290
The information in this email is confidential and may be legally
privileged.
It is intended solely for the addressee. Access to this email by anyone
else is
unauthorised.
If you are not the intended recipient delete
it from your system. Any unauthorised
disclosure, copying, distribution or action
taken in reliance on this message is
prohibited and my be unlawful.
============================================
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org