Can you repost this to the gwt-presenter group?

http://groups.google.com/group/gwt-presenter

Cheers,

Chris.


On Sep 21, 4:31 am, Sascha <[email protected]> wrote:
> Hi All,
>
> I am using the GWT Presenter library (http://code.google.com/p/gwt-
> presenter/), and currently trying to figure out how to correctly use
> the PlaceManager. I am a bit confused about the behavior as to when
> exactly the onPlaceRequest and the revealDisplay Methods for a
> Presenter that extends the WidgetPresenter are executed.
>
> Suppose I have two Presenters. An 'AdminPresenter' and a
> 'UserPresenter'. I also have a MenuPresenter and a View, which
> contains two Hyperlinks like this:
> public class MenuView extends Composite implements
> MenuPresenter.Display {
>
>   private Hyperlink userHyperlink;
>   private Hyperlink adminHyperlink;
>
>   public MenuView() {
>     final VerticalPanel panel = new VerticalPanel();
>     panel.setStyleName("menu");
>     initWidget(panel);
>
>     userHyperlink = new Hyperlink("User", "user");
>     adminHyperlink = new Hyperlink("Admin", "admin");
>
>     panel.add(learnHyperlink);
>     panel.add(adminHyperlink);
>   }
> ... additional things
>
> }
>
> I am also binding the above two hyperlinks to a ClickEvent, and my
> UserPresenter defines a PLACE called 'user', and my AdminPresenter
> defines a PLACE called 'admin'.
>
> Now here is what I don't understand: When I Click either of the links,
> then I can see that a PlaceRequestEvent is fired and the
> onPlaceRequest and revealDisplay methods of the respective Presenter
> are executed. However, when I click the the Back button of the browser
> (suppose I clicked the Admin link first, then the User link, or the
> other way around), I can see that a PlaceRequestEvent is fired too,
> but the onPlaceRequest and revealDisplay methods of the Presenter are
> not executed. I also found that if I do not bind the Hyperlinks to a
> ClickHandler, then the onPlaceRequest and revealDisplay methods are
> also not executed, which I also don't understand why :-)
>
> Is someone able to explain, how exactly in the GWT Presenter library
> the PlaceManager and all its components works, or maybe point me to
> where I might have a problem in my code?
>
> Cheers,
> Sascha
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to