Package org.olat.core.gui.control

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


    myContent = new VelocityContainer("closeablewrapper", VELOCITY_ROOT + "/index.html", null, this) {
      public void validate(UserRequest ureq, ValidationResult vr) {
        super.validate(ureq, vr);
        // just before rendering, we need to tell the windowbackoffice that we are a favorite for accepting gui-messages.
        // the windowbackoffice doesn't know about guimessages, it is only a container that keeps them for one render cycle
        WindowBackOffice wbo = getWindowControl().getWindowBackOffice();
        List zindexed = (List) wbo.getData("guimessage");
        if (zindexed == null) {
          zindexed = new ArrayList(3);
          wbo.putData("guimessage", zindexed);
        }
        zindexed.add(new ZIndexWrapper(guiMsgPlace, 20));
      }
    };
    myContent.put("guimessage", guiMsgPlace);
View Full Code Here


        super.validate(ureq, vr);
        // just before rendering, we need to tell the windowbackoffice
        // that we are a favorite for accepting gui-messages.
        // the windowbackoffice doesn't know about guimessages, it is
        // only a container that keeps them for one render cycle
        WindowBackOffice wbo = getWindowControl().getWindowBackOffice();
        List<ZIndexWrapper> zindexed = (List<ZIndexWrapper>) wbo.getData("guimessage");
        if (zindexed == null) {
          zindexed = new ArrayList<ZIndexWrapper>(3);
          wbo.putData("guimessage", zindexed);
        }
        zindexed.add(new ZIndexWrapper(guiMsgPlace, 20));
      }
    };
    mainVC.put("guimessage", guiMsgPlace);
View Full Code Here

    return smr;
  }

  private JSONObject createJSON(WindowCommand wc) {
    Command c = wc.getCommand();
    WindowBackOffice wbo = wc.getWindowBackOffice();
    long winId = wbo.getWindow().getDispatchID();
    JSONObject jo = new JSONObject();
    try {
      jo.put("cmd", c.getCommand());
      jo.put("w", winId);
      jo.put("cda", c.getSubJSON());
View Full Code Here

    // Cluster NodeId + E-Nr
    msg.contextPut("errnum", "N" + CoordinatorManager.getCoordinator().getNodeId() + "-E"+ refNum);
    msg.contextPut("supportaddress", WebappHelper.getMailConfig("mailSupport"));
    msg.contextPut("time", formatter.formatDateAndTime(new Date()));

    WindowBackOffice wbo = ws.getWindowManager().createWindowBackOffice("errormessagewindow", this);
    Window w = wbo.getWindow();
   
    msg.put("jsCssRawHtmlHeader", w.getJsCssRawHtmlHeader());   
    // the current GUI theme and the global settings that contains the
    // font-size. both are pushed as objects so that window.dirty always reads
    // out the correct value
View Full Code Here

    if (source == closeLink) {
      // close window (a html page which calls Window.close onLoad
      ureq.getDispatchResult().setResultingMediaResource(
          new RedirectMediaResource(StaticMediaDispatcher.createStaticURIFor("closewindow.html")));
      // release all resources and close window
      WindowBackOffice wbo = getWindowControl().getWindowBackOffice();
      Window w = wbo.getWindow();
      Windows.getWindows(ureq).deregisterWindow(w);
      wbo.dispose();

    } else if (source == langSelection) {
      String langKey = langSelection.getSelectedKey();
      Locale locale = I18nManager.getInstance().getLocaleOrDefault(langKey);
      setLocale(locale, true);
View Full Code Here

    }

    // Maybe the user changed the font size
    if (ureq.getIdentity().equalsByPersistableKey(tobeChangedIdentity)) {
      int fontSize = Integer.parseInt(fontsize.getSelectedKey());
      WindowBackOffice wbo = getWindowControl().getWindowBackOffice();
      wbo.getWindowManager().setFontSize(fontSize);
      // set window dirty to force full page refresh
      wbo.getWindow().setDirty(true);
    }

    if (um.updateUserFromIdentity(tobeChangedIdentity)) {
      // Language change needs logout / login
      getWindowControl().setInfo(translate("preferences.successful"));
View Full Code Here

    busMsgs.contextPut("time", Formatter.formatDatetime(new Date()));
   
    mainVc.put("busmsgs", busMsgs);
    // let a thread repeatively dump all messages
    //final Formatter f = Formatter.getInstance(ureq.getLocale());
    final WindowBackOffice wbo = getWindowControl().getWindowBackOffice();
    Thread pollThread = new Thread(new Runnable(){
      public void run() {
        while (!disposed) {
          try {
            Thread.sleep(1000);
          } catch (InterruptedException e) {
            // ignore
          }
          wbo.invokeLater(new Runnable() {
            public void run() {
              // simple reput the new lists into the velocity container.
              // the container is then dirty and automatically rerendered since polling has been turned on here.
              busMsgs.contextPut("time", Formatter.formatDatetime(new Date()));
              busMsgs.contextPut("recmsgs", clusBus.getListOfReceivedMsgs());
View Full Code Here

  protected void event(UserRequest ureq, Component source, Event event) {
    if(source == closeLink){
      // close window (a html page which calls Window.close onLoad
      ureq.getDispatchResult().setResultingMediaResource(new RedirectMediaResource(StaticMediaDispatcher.createStaticURIFor("closewindow.html")));
      // release all resources and close window
      WindowBackOffice wbo = getWindowControl().getWindowBackOffice();
      Window w = wbo.getWindow();
      Windows.getWindows(ureq).deregisterWindow(w);
      wbo.dispose();     
    }

  }
View Full Code Here

    }

    //Window w = new Window("messagewindow", this, jsadder);
   
    Windows ws = Windows.getWindows(ureq);
    WindowBackOffice wbo = ws.getWindowManager().createWindowBackOffice("messagewindow", this);
    Window w = wbo.getWindow();
   
    msg.put("jsAndCssC", w.getJsCssRawHtmlHeader());
    msg.contextPut("theme", w.getGuiTheme())
   
    w.setContentPane(msg);
View Full Code Here

    // set it into a panel
    updatePanel.setContent(updateVc);
    appearLater = LinkFactory.createButtonXSmall("appearLater", null, this);
   
    // hold the windowcontrol
    final WindowBackOffice wbo = getWindowControl().getWindowBackOffice();
    Thread t = new Thread(new Runnable() {
      public void run() {
        for (int i=0; i<20; i++) {
          final int j = i;
          wbo.invokeLater(new Runnable(){
            public void run() {
              updateVc.contextPut("msg", ""+j);             
            }
          });
          try {
View Full Code Here

TOP

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

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.