Results 1 to 2 of 2
- 09-07-2010, 10:20 PM #1Member
- Join Date
- Sep 2010
- Rep Power
[Question] MVP with GWT application
I'm developing a website using Google Web Toolkit GWT and I want to use the Model View Presenter design pattern.
I've read that the relation between view and presenter is a one to one relation..
My main page of the website consists of three main parts, or maybe 3 views.
One of them contains a menu, and the required view is displayed according to the chosen item in the menu..
I've downloaded a sample project using MVP
You can download the sample source code from here Large scale application development and MVP - Google Web Toolkit - Google Code
I don't know how to do something like this (display different view at the same page accprding to the selected menuItem) since only one view can be displayed at a time ( the Application Controller decides which view appears)
Thanks in advance :)
- I don't know how to do something like this (display different view at the same page accprding to the selected menuItem) since only one view can be displayed at a time ( the Application Controller decides which view appears)
You can think these views at the same page as "one" view. As far as i see, it is just your definition. If you define that way, you might think you are trying to do something unusual but if you consider all of the components in a page as a view, i believe your problem becomes trivial.
Furthermore, you can add/remove components to the page dynamically when the page is loaded. So you have the maximum flexibility.
I guess you are not familiar with GWT. Based on the above example, you can just prepare the views you mentioned and show them on the screen based on user selection at any time.
I suggest you to start development incrementally. Once you read the docs and implement your problem, you will have a better understanding of doing things in GWT way. You can redesign your application later if you need."The sole cause of manís unhappiness is that he does not know how to stay quietly in his room." - Blaise Pascal
- By orchid in forum Advanced JavaReplies: 9Last Post: 12-19-2010, 09:49 AM
- By Psyclone in forum AWT / SwingReplies: 1Last Post: 03-26-2010, 11:41 PM
- By realahmed8 in forum AWT / SwingReplies: 3Last Post: 12-04-2009, 01:10 PM
- By ChrisMayhew in forum New To JavaReplies: 5Last Post: 01-09-2009, 09:44 PM
- By Java Tip in forum Java TipReplies: 0Last Post: 02-16-2008, 10:29 PM