PlaceManager and injection

64 views
Skip to first unread message

Marteijn Nouwens

unread,
Nov 12, 2015, 4:39:10 AM11/12/15
to GWTP
I am working on an app that diplays data and for that data we have widget which are contructed with pojo objects.

A dialog can be shown and in some cases we want to navigate to another page/presenter.


PlaceRequest placeRequest = new PlaceRequest.Builder().nameToken(NameTokens.sellingparty).build();
this.hide();
// placeManager.unlock();
try {
e.preventDefault();
placeManager.revealPlace(placeRequest, false);
} catch (Exception e1) {
// TODO Auto-generated catch block
Window.alert("" + e1);
}

The exception block should not be there but it's whorwing an exception 

Uncaught com.google.gwt.event.shared.UmbrellaException: Exception caught: Encountered repeated errors resulting in an infinite loop. Make sure all users have access to the pages revealed by revealErrorPlace and revealUnauthorizedPlace. (Note that the default implementations call revealDefaultPlace)

We create the dialog like:

@Override
public void onSuccess(Method method, String response) {
MyWidgetInjector injector = GWT.create(MyWidgetInjector.class);
HdnMessageDialog di = injector.getHdnMessageDialog();
Anchor path = new Anchor(toSet);
di.addExtraInfo(path);
di.setValue(response);
di.addXmlStyling();
di.center();

}

The contructor is:

private PlaceManager placeManager;

@Inject
public HdnMessageDialog(PlaceManager newPlaceManager) {
super();
placeManager = newPlaceManager;


Question,

Should it fail. Is this due to the injection method injecting the wrong place manager  or due to some other problem. The same code works from a different presenter.

Thanks




Marteijn Nouwens

unread,
Nov 12, 2015, 5:33:49 AM11/12/15
to GWTP
Extra info

Window.Location
.replace("/hdnmonitor/#/sellingparty?commercialLabel=" + commercialLabel + "&search=" + tpNumber);


Will also cause the exception:

Uncaught com.google.gwt.event.shared.UmbrellaException: Exception caught: Encountered repeated errors resulting in an infinite loop. Make sure all users have access to the pages revealed by revealErrorPlace and revealUnauthorizedPlace. (Note that the default implementations call revealDefaultPlace)

So i gues. It not the injected place manager :-)




Clay Harris

unread,
Nov 12, 2015, 8:40:35 AM11/12/15
to GWTP
In my experience, that particular exception occurs when a user's not authorized to view the current page, so it redirects to unauthorized place, which they're not authorized to view, so it redirects to unauthorized place, which they're not authorized to view, so... well you get the idea :)  Same for errorplace - if the errorplace causes errors, it'll result in an infinite loop.  placemanager related, but not exactly caused by it

--
You received this message because you are subscribed to the Google Groups "GWTP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gwt-platform...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages