This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes GUI Enhancement/Cleanup question Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Reply Bookmark "GUI Enhancement/Cleanup question" Watch "GUI Enhancement/Cleanup question" New topic
Author

GUI Enhancement/Cleanup question

Aruna Raghavan
Ranch Hand

Joined: May 14, 2002
Posts: 194
Hi All,
I am thinking about cleaning up my gui a bit-
I had originally coded my View such that if the actionPerformed is due to Search/Purchase button being clicked, my Controller would get the event rather than the View. However, now my Controller is doing some validation on some of the fields such as "number of tickets", is a row of flights selected before the user pushed the purchase button etc.
I am thinking about moving this action handling back into my View. After the view is done validating the input data, it can fire a FlightEvent to notify the controller. In other words, the Controller will register itself as a FlightEvent listener rather than an ActionListener. Controller will just do the work of calling methods on the DataModel as usually.

I would like to know what you think about this approach, thanks.


Aruna A. Raghavan<br />SCJP, SCJD, SCWCD
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: GUI Enhancement/Cleanup question
 
Similar Threads
MVC and my design
event handling for med sized MVC app
Is MVC Pattern Overkill?
One view/controller, pluggable models
GUI Frustration - help NEEDED!