wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes MVC With Action Classes - is it possible? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "MVC With Action Classes - is it possible?" Watch "MVC With Action Classes - is it possible?" New topic
Author

MVC With Action Classes - is it possible?

Nick Kerr
Greenhorn

Joined: Aug 14, 2006
Posts: 7
Has anyone implemented the MVC pattern making use of Action classes? I would prefer to use Action classes over anonymous inner classes since Action classes can be created by a Factory and can easily enable or disable multiple UI components when the Action is enabled/disabled.

All of the example MVC code that I find on the Web and JavaRanch seems to provide ActionListener hooks in the View that allow the Controller to register its ActionListeners. The problem here is that if I add an Action as an ActionListener, I will not have the ability to enable/disable UI components by simply enabling/disabling the Action.

Is it possible to create a good MVC design and still use Action classes? If so, how?
[ August 15, 2006: Message edited by: Nick ]
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Hello "Nick",

Welcome to JavaRanch.

On your way in you may have missed that we have a JavaRanch Naming Policy for displayed (screen) names. Your displayed name must consist of a first name (or an initial), a space, and a family name (in that order) and not be obviously fictitious. Since yours, "Nick" does not conform with it, please take a moment to change it, which you can do right here.

Posters with nonconforming displayed names will be locked out of JavaRanch after a few posts using those names.

Thanks
-Barry

(NR) - search tag


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MVC With Action Classes - is it possible?
 
Similar Threads
What is MVC
MVC design issue
How to pass GUI data to custom Swing actions ?
Polymorphism or conditionals ?
[SWING - GUI]: Action vs ActionListener