Results 1 to 2 of 2
  1. #1
    Heba123 is offline Member
    Join Date
    Sep 2010
    Posts
    1
    Rep Power
    0

    Default [Question] MVP with GWT application

    Hello

    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 :)

  2. #2
    Java Tip's Avatar
    Java Tip is offline Moderator
    Join Date
    Nov 2007
    Posts
    1,694
    Blog Entries
    430
    Rep Power
    9

    Default

    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

Similar Threads

  1. Question mark colon operator question
    By orchid in forum Advanced Java
    Replies: 9
    Last Post: 12-19-2010, 08:49 AM
  2. Replies: 1
    Last Post: 03-26-2010, 10:41 PM
  3. Replies: 3
    Last Post: 12-04-2009, 12:10 PM
  4. [SOLVED] Chat Application question
    By ChrisMayhew in forum New To Java
    Replies: 5
    Last Post: 01-09-2009, 08:44 PM
  5. Replies: 0
    Last Post: 02-16-2008, 09:29 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •