Search in sources :

Example 1 with Page

use of com.willshex.blogwt.client.page.Page in project blogwt by billy1380.

the class NavigationController method attachPage.

private void attachPage(PageType type, final NavigationChangedEvent event) {
    Page page = null;
    if ((page = getPageFromCache(type)) == null) {
        createAsyncPage(type, event);
    }
    if (page != null) {
        if (!page.isAttached()) {
            pageHolder.clear();
            if (page.hasHeader()) {
                pageHolder.add(page.getHeader());
            }
            pageHolder.add(page);
            if (page.hasFooter()) {
                pageHolder.add(page.getFooter());
            }
        }
        Scheduler.get().scheduleDeferred(() -> DefaultEventBus.get().fireEventFromSource(event, NavigationController.this));
    }
}
Also used : NotFoundPage(com.willshex.blogwt.client.page.blog.notfound.NotFoundPage) Page(com.willshex.blogwt.client.page.Page)

Aggregations

Page (com.willshex.blogwt.client.page.Page)1 NotFoundPage (com.willshex.blogwt.client.page.blog.notfound.NotFoundPage)1