Hi all,

I have a question for the GWT-MVP experts out there. If there is a more
suitable forum, please let me know.

I have a menu panel which contains a flowpanel for menu items, and another
flowpanel where the required page will display itself when the associated
menu item is clicked.

The MenuPanel presenter is creating menu items and sending the MenuItem
views to the MenuPanel view to be added.

The problem is this: If there are a number of possible MenuPanel views, then
the MenuPanel presenter can't know which MenuItem view it should create
(blue, green, red, text-based, image-based, therefore presumably each
MenuPanel view should decide.

The MenuPanel view can't be the creator of the MenuItems because it doesn't
know which menu items should be created (for example, you might be allowed
to see admin menu items or not - this kind of logic should not be in the
view).

So my current solution is to get the MenuPanel presenter to fetch the
MenuItem view from the MenuPanel view.

Now, if you are still following me, is this what I should be doing? Or have
I completely lost the plot somewhere along the line?

Although there are endless (generally slightly contradictory) explanations
of MVP (and please note that I don't think I need another explanation of
that), there isn't anything I can find that explains how to nail together
the various self-contained MVP widgets - at least, not in a way that allows
an event bus to operate.

Ian

http://examples.roughian.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to