I want to map a specific place to a presenter depending on parameters or even async information.
For example I have a url: message?id=messageId
This should load the details of that message and depending on meta info this should show one view or another one.
How do I do this with GWTP ? Can I somehow intercept an event and the implement some logic to start the right presenter ?
itsPlaceManager.getCurrentPlaceRequest().getParameter("id", "")
public static final Slot SLOT_MESSAGE_1 = new Slot();
public static final Slot SLOT_MESSAGE_2 = new Slot();
And representing these 2 slots, your 2 presenter widgets:
private Message1PresenterWidget itsMessage1PresenterWidget;
private Message2PresenterWidget itsMessage2PresenterWidget;depending on the message metadata, you set the appropriate slot:
if (message1) {
setInSlot(SLOT_MESSAGE_1, itsMessage1PresenterWidget);
} else if () {
setInSlot(SLOT_MESSAGE_2, itsMessage2PresenterWidget);
}
In your presenter's view, you'll need to have placeholders for these 2 slots
--
You received this message because you are subscribed to a topic in the Google Groups "GWTP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gwt-platform/CbshvsUFTqg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gwt-platform...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
@ProxyStandard
public interface MyProxy
extends Proxy<ApplicationPresenter> {
}
@ProxyStandard
public interface MyProxy
extends Proxy<MainPresenter> {
}
@NameToken (NameTokens.CHILD)
@ProxyCodeSplit
@NoGatekeeper
public interface MyProxy
extends ProxyPlace<ChildPresenter> {
}