예제 #1
0
  protected CloudCoderPage createPageForPageId(PageId pageId, String pageParams) {
    CloudCoderPage page = createPageForPageId(pageId);

    // Create a reasonable PageStack.
    // (Note that we need to disable notifications while we do this,
    // since we're not actually navigating pages.)
    PageStack pageStack = session.get(PageStack.class);
    pageStack.setNotifications(false);
    page.initDefaultPageStack(pageStack);
    pageStack.push(page.getPageId());
    pageStack.setNotifications(true);

    // Set initial page parameters (if any)
    if (pageParams != null) {
      page.setUrlFragmentParams(pageParams);
    }

    return page;
  }
예제 #2
0
 @Override
 public void initDefaultPageStack(PageStack pageStack) {
   pageStack.push(PageId.COURSES_AND_PROBLEMS);
   pageStack.push(PageId.USER_ADMIN);
 }