We just made a custom PlaceController and Historian to share some log 
messages. Most of the google methods are private so that we can't just 
override them implementing our log messages.

You mentioned GWT.setUncaughtExceptionHandler and i already placed it in my 
code. But it may be the wrong place. Where do i have to place it to catch 
all the exceptions mentioned?


But maybe our placecontroller puts some magic in there:

public DfsPlaceController(EventBus eventBus) {
        super(eventBus);
    }

    public DfsPlaceController(EventBus eventBus, Delegate delegate) {
        super(eventBus, delegate);
    }

    protected BreadcrumbBar createBreadcrumbBar() {
        BreadcrumbBar breadcrumbBar = new BreadcrumbBar();
        return breadcrumbBar;
    }

    @Override
    public void goTo(Place newPlace) {
        LOG.debug("goTo: " + newPlace);
        super.goTo(newPlace);
        updateBreadcrumbBar(newPlace);
    }

    public void updateBreadcrumbBar() {
        updateBreadcrumbBar(getWhere());
    }

    protected void updateBreadcrumbBar(Place place) {
        try {

            RootPanel breadcrumbRootPanel = RootPanel.get("breadcrumb");
            if (breadcrumbRootPanel.getWidgetCount() == 0) {
                LOG.debug("#updateBreadcrumbBar: No breadcrumb rootpanel 
available.");
                return;
            }

            Widget widget = breadcrumbRootPanel.getWidget(0);
            if (!(widget instanceof BreadcrumbBar)) {
                LOG.debug("#updateBreadcrumbBar: The first widget is not the 
breadcrumb bar.");
                return;
            }

            BreadcrumbBar breadcrumbBar = (BreadcrumbBar) widget;
            BreadcrumbItem[] items = BreadcrumbBar.NO_BREADCRUMB_ITEMS;
            if (place instanceof AbstractPlace) {
                AbstractPlace abstractPlace = (AbstractPlace) place;
                items = abstractPlace.getBreadcrumbItems();
            }
            breadcrumbBar.setBreadcrumbItems(items);

        } catch (Exception ex) {
            LOG.error("Unable to update breadcrumb bar.", ex);
        }
    }


-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/iBRD7KmQTPwJ.
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