View don't show

18 views
Skip to first unread message

Diogo Longo

unread,
Nov 26, 2012, 7:19:16 AM11/26/12
to gwt-pl...@googlegroups.com
hi,

my project has 5 presenters/view the default place is called home, the navigation works well, but when I call logout the action hits the server, invalidate the session and the user is redirect to home by calling the code:

placeManager.revealDefaultPlace();

the home view show perfectly, I navigate to Login page again, fill fields and hit the login button, the action hits the server, the onSuccess is called with the code:

PlaceRequest placeRequest = new PlaceRequest(NameTokens.menu);
getPlaceManager().revealPlace(placeRequest,true);

The token #menu appear in the browser url but the view don't show up, is there a configuration that I miss?

I don't get any errors or warnings...

Christian Goudreau

unread,
Nov 26, 2012, 11:12:57 AM11/26/12
to gwt-pl...@googlegroups.com
Little comment: you don't need to specify true (it's always true by default) in revealPlace

has #menu appeared before? did you unbind the presenter? When a presenter doesn't show up, it's often because of the gin bindings and even more often because we forgot to add the provider inside the ginjector. (Issue that I'll be working on the next two week FYI).

If it was appearing before, it's often because of something done in onUnbind... I'll need the code of the onBind and onUnding to see what's going on.

Cheers,



--
 
 



--
Christian Goudreau

Diogo Longo

unread,
Nov 26, 2012, 11:58:41 AM11/26/12
to gwt-pl...@googlegroups.com
Hi Christian,

tks for the quickly response, I don't override the onUnbind method.

I navigate in the order:

home > login > menu appear.
logout> home> login> menu dont appear.

that's the code on ginjector:
Provider<HomePresenter> getHomePresenter();
   
Provider<LoginPresenter> getLoginPresenter();

AsyncProvider<MenuPresenter> getMenuPresenter();

and the code on the clientModule:
bindPresenter(LoginPresenter.class, LoginPresenter.MyView.class,
               
LoginView.class, LoginPresenter.MyProxy.class);

bindPresenter
(HomePresenter.class, HomePresenter.MyView.class,
               
HomeView.class, HomePresenter.MyProxy.class);

bindPresenter
(MenuPresenter.class, MenuPresenter.MyView.class,
               
MenuView.class, MenuPresenter.MyProxy.class);

the bind method are the same in all presenters:
@Override
   
protected void onBind() {
       
super.onBind();
   
}

Christian Goudreau

unread,
Nov 26, 2012, 12:11:28 PM11/26/12
to gwt-pl...@googlegroups.com
Will need more of the code to analyse then

Diogo Longo

unread,
Nov 26, 2012, 12:38:49 PM11/26/12
to gwt-pl...@googlegroups.com
I found the error....

I create a presenter that act as a layout, then I defined two types of content, others presenters always call a code like that:
RevealContentEvent.fire(this,InternalPresenter.TYPE_WorkContent, this);

after a refactory the code in setInSlot ignore the ContentSlot and always set the widget in the same slot. I removed the contentSlot that I don't user anymore, change the slot used in presenters and the navigation works.

the @ContentSlot is used behind the scene right?

tks for the response.

Christian Goudreau

unread,
Nov 26, 2012, 12:39:50 PM11/26/12
to gwt-pl...@googlegroups.com
Yes it is! :D
Reply all
Reply to author
Forward
0 new messages