Example #1
0
 private void launch(UserRequest ureq, String businessPath) {
   if (StringHelper.containsNonWhitespace(businessPath)) {
     try {
       // make the resume secure. If something fail, don't generate a red screen
       NewControllerFactory.getInstance().launch(businessPath, ureq, getWindowControl());
     } catch (Exception e) {
       logError("Error while resuming", e);
     }
   }
 }
Example #2
0
 private void launch(UserRequest ureq, BusinessControl bc) {
   if (bc == null) return;
   WindowControl bwControl =
       BusinessControlFactory.getInstance().createBusinessWindowControl(bc, getWindowControl());
   try {
     // make the resume secure. If something fail, don't generate a red screen
     NewControllerFactory.getInstance().launch(ureq, bwControl);
   } catch (Exception e) {
     logError("Error while resuming", e);
   }
 }
 /**
  * @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest,
  *     org.olat.core.gui.components.Component, org.olat.core.gui.control.Event)
  */
 public void event(UserRequest ureq, Component source, Event event) {
   if (source == showAllLink) {
     // activate homes tab in top navigation and active bookmarks menu item
     String resourceUrl = "[HomeSite:" + ureq.getIdentity().getKey() + "][notifications:0]";
     BusinessControl bc = BusinessControlFactory.getInstance().createFromString(resourceUrl);
     WindowControl bwControl =
         BusinessControlFactory.getInstance().createBusinessWindowControl(bc, getWindowControl());
     NewControllerFactory.getInstance().launch(ureq, bwControl);
   } else if (event == ComponentUtil.VALIDATE_EVENT && needsModelReload) {
     // updateTableModel(ureq.getLocale(), ureq.getIdentity());
     reloadModel(sortingCriteria);
     needsModelReload = false;
   }
 }
Example #4
0
  @Override
  protected void formOK(UserRequest ureq) {
    savePreferences(ureq, "auto");
    fireEvent(ureq, Event.DONE_EVENT);

    HistoryPoint historyEntry = historyManager.readHistoryPoint(ureq.getIdentity());
    if (historyEntry != null
        && StringHelper.containsNonWhitespace(historyEntry.getBusinessPath())) {
      List<ContextEntry> cloneCes =
          BusinessControlFactory.getInstance().cloneContextEntries(historyEntry.getEntries());
      BusinessControl bc = BusinessControlFactory.getInstance().createFromContextEntries(cloneCes);
      WindowControl bwControl =
          BusinessControlFactory.getInstance().createBusinessWindowControl(bc, getWindowControl());
      try {
        // make the resume secure. If something fail, don't generate a red screen
        NewControllerFactory.getInstance().launch(ureq, bwControl);
      } catch (Exception e) {
        logError("Error while resumging", e);
      }
    }
  }