Package org.olat.core.gui.control

Examples of org.olat.core.gui.control.Controller


    int cnt = controllers.size();
    String[] names = new String[cnt];
    for (int i = 0; i < cnt; i++) {
      String cName = "c" + i; // c0 c1 c2
      names[i] = cName;
      Controller cont = (Controller) controllers.get(i);
      myContent.put(cName, cont.getInitialComponent());
    }
    myContent.contextPut("names", names);
    setInitialComponent(myContent);
  }
View Full Code Here


  /**
   * @see org.olat.core.gui.control.DefaultController#doDispose(boolean)
   */
  protected void doDispose() {
    for (Iterator it_conts = controllers.iterator(); it_conts.hasNext();) {
      Controller cont = (Controller) it_conts.next();
      cont.dispose();
    }
  }
View Full Code Here

    return ae.createController(ureq, getWindowControl(), null);
  }

 
  private Controller getContentCtr(Object uobject, UserRequest ureq){
    Controller contentCtr1Tmp = null;
    if (uobject instanceof ActionExtension) {
      ActionExtension ae = (ActionExtension) uobject;
      contentCtr1Tmp = createController(ae, ureq);
    } else {
      contentCtr1Tmp = handleOwnMenuTreeEvent(uobject, ureq);
View Full Code Here

    sb.append("</div></div>");
  }

  private void dumpTree(StringOutput sb, Component current, int indent, Map<Controller, List<Component>> controllerInfos) {
    // add infos,
    Controller lController = org.olat.core.gui.dev.Util.getListeningControllerFor(current);
    if (lController != null) {
      List<Component> lcomps = controllerInfos.get(lController);
      if (lcomps == null) {
        // first entry
        lcomps = new ArrayList<Component>();
View Full Code Here

      BusinessControl bc = BusinessControlFactory.getInstance().createFromString(bookmark);
      // generate new window control with the business control attached to it
      bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(bc, bwControl);
    }   
   
    Controller c = contentControllerCreator.createController(ureq, bwControl);
    sbasec.setContentController(c);
   
    bcc.setContentController(true, sbasec);
    return bcc;
  }
View Full Code Here

  }

  @Override
  public Controller cloneController(UserRequest ureq, WindowControl wControl) {
    if(contentController == null || contentController instanceof CloneableController) {
      Controller wrappedAndCloned = ((CloneableController)contentController).cloneController(ureq, wControl);
      TitledWrapperController clone = new TitledWrapperController(ureq, wControl, wrappedAndCloned, wrapperCss, titleInfo);
      clone.setTitle((String)theVelocityContainer.getContext().get(TITLE_VAR));
      clone.setContextTitle((String)theVelocityContainer.getContext().get(CONTEXT_TITLE_VAR));
      clone.setTitleCssClass((String)theVelocityContainer.getContext().get(TITLE_CSS));
      clone.setSeparatorEnabled((Boolean)theVelocityContainer.getContext().get(USE_SEPARATOR))
View Full Code Here

  protected void setIsEditMode(UserRequest ureq, Boolean editModeEnabled) {
    this.portletContainerVC.contextPut(MODE_EDIT, editModeEnabled);
   
    //only create sorting and moving stuff if switching to edit mode otherwise lots or memory is wasted!
    if (editModeEnabled) {
      Controller additionalPortletTools = portlet.getTools(ureq, getWindowControl());
      if(additionalPortletTools!=null) {
        toolboxContainer.contextPut("hasAdditional", Boolean.TRUE);
        toolboxContainer.put("additionalTools", additionalPortletTools.getInitialComponent());
      }
    }
   
  }
View Full Code Here

    Exception re = null;
    try {
      Class cclazz = Thread.currentThread().getContextClassLoader().loadClass(className);
      Constructor con = cclazz.getConstructor(ARGCLASSES);
      Object o = con.newInstance(new Object[]{ ureq, wControl});
      Controller c = (Controller)o;
      return c;
    } catch (ClassNotFoundException e) {
      re = e;
    } catch (SecurityException e) {
      re = e;
View Full Code Here

        // method without instantiated class (o = null).
      }

      Method method = cclazz.getMethod(factoryMethod, ARGCLASSES);
      Object result = method.invoke(o, new Object[] { lureq, lwControl });
      Controller c = (Controller) result;
      return c;
    } catch (ClassNotFoundException e) {
      re = e;
    } catch (SecurityException e) {
      re = e;
View Full Code Here

        try {
          final GenericEventListener listener = liArr[i];
         
          //make sure GenericEvents are only sent when controller is not yet disposed
          if (listener instanceof Controller) {
            Controller dCtrl = (Controller)listener;
            if (!dCtrl.isDisposed()) {
              ThreadLocalUserActivityLoggerInstaller.runWithUserActivityLogger(new Runnable() {
                public void run() {
                  listener.event(event);
                }
              }, UserActivityLoggerImpl.newLoggerForEventBus(dCtrl));
View Full Code Here

TOP

Related Classes of org.olat.core.gui.control.Controller

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.