So you want this "displayHelp" round trip to be available in all of your
action classes with the behaviour in each case being identical, namely
set a flag and return to a named forward. If this accurately describes
your scenario then creating a BaseAction would certainly help. The
Struts wiki has a simple description of a BaseAction scenario:
http://wiki.apache.org/struts/StrutsCatalogBaseAction. 

Combining this with a DispathAction in which you define a "displayHelp"
method might be a neat solution, in this way you can eaily override the
default implementation of "displayHelp" should you need to do so. See
http://husted.com/struts/tips/002.html for more details on
DispatchAction.



-----Original Message-----
From: Donie Kelly [mailto:[EMAIL PROTECTED] 
Sent: 19 November 2004 16:01
To: Struts Users Mailing List
Subject: RE: Refreshing a page


Hi Colm

Yes, this is what I was thinking too but I was hoping add this
functionality
to every page in our app. Doing this would involve modifing each and
every
action class. 

Can this be done any other way? Coudl I subclass the Action class and
use
that instead of Action in all my forms?

Thanks
Donie


-----Original Message-----
From: McDonnell, Colm (MLIM) [mailto:[EMAIL PROTECTED] 
Sent: 19 November 2004 16:04
To: Struts Users Mailing List
Subject: RE: Refreshing a page

Your button should submit the form, thereby sending you to its
associated action class. 
In the action class set your flag, in the session (as per your
suggestion) or preferably in the form bean, then forward back to where
you came from.


-----Original Message-----
From: Donie Kelly [mailto:[EMAIL PROTECTED] 
Sent: 19 November 2004 15:46
To: Struts Mailing List ([EMAIL PROTECTED])
Subject: Refreshing a page


Hi all

 

I'm a struts newbie and I want to add a graphic button on a page (which
is
done) which, when pressed, will refresh the page and display some help
for
various items.

 

I know how to add the help uisng logic tags etc but what I need to
figure
out (I already tried searching the archives) is as follows:

 

1)       When button is pressed the current page is refreshed and
inserts a
boolean in the session data

2)       That flag can then be used in the logic tag to decide when to
display the help texts

 

Many thanks

Donie 
--------------------------------------------------------
 
If you are not an intended recipient of this e-mail, please notify the
sender, delete it and do not read, act upon, print, disclose, copy,
retain
or redistribute it. Click here for important additional terms relating
to
this e-mail.     http://www.ml.com/email_terms/ 
--------------------------------------------------------
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] 
--------------------------------------------------------
 
If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Click here for important additional terms relating to this 
e-mail.     http://www.ml.com/email_terms/ 
--------------------------------------------------------
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to