Extending Action (or dispatcher action for reuse)
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   emerson_cargnin
Posted On:   Thursday, June 26, 2003 08:52 PM

Hi We are developing a weblog using struts/tiles, and we have a lot of actions that repeat code that are used by common tiles. I have some actions that subclass Action and others that subclass DispatchAction. I wanna pool out the common code for a general class that will be all superclass for all my actions. Which is the better way? For the former sublaclasses of dispatcher action, the execute method of my superclass is executed, but for the former Action subclasses not. Should I create a template method and call it from my superclass? this way I should have to change the execute method of those class to some other method name, and i'd like to mantain that name (execute) in the subclasses, is this possible? BTW, any help in the project wi   More>>

Hi

We are developing a weblog using struts/tiles, and we have a lot of actions that repeat code that are used by common tiles. I have some actions that subclass Action and others that subclass DispatchAction. I wanna pool out the common code for a general class that will be all superclass for all my actions. Which is the better way? For the former sublaclasses of dispatcher action, the execute method of my superclass is executed, but for the former Action subclasses not. Should I create a template method and call it from my superclass? this way I should have to change the execute method of those class to some other method name, and i'd like to mantain that name (execute) in the subclasses, is this possible?

BTW, any help in the project will be welcome.
The project uses, struts, tiles, hibernate, and we are going to make a JDO version.

The project page :

http://sourceforge.net/projects/personalblog
the blog in action (mine):
http://echofloripa.homelinux.net:8080/personalblog

   <<Less
About | Sitemap | Contact