Examples of Panel


Examples of org.olat.core.gui.components.panel.Panel

   * used only by e.g. the development controller
   *
   * @return a protected panel
   */
  public static Component createDebugProtectedWrapper(Component comp) {
    Panel p = new Panel(MAGIC_KEY);
    p.setContent(comp);
    return p;
  }
View Full Code Here

Examples of org.olat.core.gui.components.panel.Panel

   * @param wControl
   */
  ClipboardTrayController(UserRequest ureq, WindowControl wControl, ClipboardServiceImpl cbs) {
    super(ureq, wControl);
    this.cbs = cbs;
    expandedP = new Panel("trayExpanded");

    mainVc = createVelocityContainer("tray");
    ComponentUtil.registerForValidateEvents(mainVc, this);
    openDetail = LinkFactory.createLink("opendetail", mainVc, this);
    mainVc.put("expanded", expandedP);
View Full Code Here

Examples of org.olat.core.gui.components.panel.Panel

    *
    */
  public SinglePageController(UserRequest ureq, WindowControl wControl, boolean inIframe, VFSContainer rootContainer, String fileName, String currentUri, boolean allowRelativeLinks, boolean showHomeLink, OLATResourceable contextResourcable) {
    super(wControl);
    trans = new PackageTranslator(PACKAGE, ureq.getLocale());
    Panel mainP = new Panel("iframemain");
    myContent = new VelocityContainer("singlepagecontent", VELOCITY_ROOT + "/index.html", trans, this);
   
    homeLinkP = new Panel("homelink");
    homeLinkContent = new VelocityContainer("homelinkcontent", VELOCITY_ROOT + "/homelink.html", trans, this);
    homeLinkContent.contextPut("showHomeLink",showHomeLink?Boolean.TRUE:Boolean.FALSE);   
    homeLink = LinkFactory.createCustomLink("command.home", "command.home", "", Link.NONTRANSLATED, homeLinkContent, this);
    homeLink.setCustomEnabledLinkCSS("b_content_reset");
    homeLink.setTooltip(trans.translate("command.home"), false);
   
    myContent.put("homelinkpanel", homeLinkP);
    // remember values in case of later cloning
    // g_fileName : initial file name given (no root correction), e.g. bla.html or f/g/blu.html
    // always use non-iframe mode for screenreaders
    this.g_inIframe = (inIframe && (! getWindowControl().getWindowBackOffice().getWindowManager().isForScreenReader()));
    this.g_showHomeLink = showHomeLink;
    this.g_allowRelativeLinks = allowRelativeLinks;
    this.g_fileName = fileName;
    this.g_rootContainer = rootContainer;
    boolean jumpIn = false;
   
    // strip beginning slash
    String startURI = ( (fileName.charAt(0) == '/')? fileName.substring(1) : fileName);

    // jump (e.g. from search) to the path if the business-launch-path says so.
    BusinessControl bc = getWindowControl().getBusinessControl();
    ContextEntry ce = bc.popLauncherContextEntry();
    if ( ce != null ) { // a context path is left for me
      Tracing.logDebug("businesscontrol (for further jumps) would be:"+bc, SinglePageController.class);
      OLATResourceable ores = ce.getOLATResourceable();
      Tracing.logDebug("OLATResourceable=" + ores, SinglePageController.class);
      String typeName = ores.getResourceableTypeName();
      // typeName format: 'path=/test1/test2/readme.txt'
      // First remove prefix 'path='
      String path = typeName.substring("path=".length());
      if  (path.length() > 0) {
        Tracing.logDebug("direct navigation to container-path=" + path, SinglePageController.class);
        jumpIn = true;
        currentUri = path;
        startURI = path;
      }
    }
   
    // adjust root folder if security does not allow using ../.. etc.
    if (!allowRelativeLinks && !jumpIn) {
      // start uri is filename without relative path.
      // the relative path of the file is added to the vfs rootcontainer
      int sla = startURI.lastIndexOf('/');
      if (sla != -1) {
        String root = startURI.substring(0,sla);
        startURI = startURI.substring(sla+1);
        VFSContainer newroot = (VFSContainer)rootContainer.resolve(root);
        this.g_new_rootContainer = newroot;
      } else {
        this.g_new_rootContainer = rootContainer;       
      }
    } else {
      this.g_new_rootContainer = rootContainer;
    }
    this.g_initialUri = startURI;
    setCurURI(startURI);
   
    // startURI and g_new_rootContainer set
    // g_curURI   : the current uri (relative to the (evt. corrected) rootcontainer)
    // g_new_rootContainer : the given rootcontainer or adjusted in case when relativelinks are not allowed   
   
    // Display in iframe when
    // a) configured as to be displayed in iframe and not in braille mode
    // b) page is a direct jump in (unclear why not in this case, code was like that)
    // c) when page type can not be inline rendered (e.g. when page is a pdf file)
    if (g_inIframe || jumpIn || !HtmlStaticPageComponent.isFileTypeSupported(startURI)) {
      idc = new IFrameDisplayController(ureq, getWindowControl(), g_new_rootContainer, contextResourcable);
      idc.addControllerListener(this);
      idc.setCurrentURI(startURI);
      myContent.put("content", idc.getInitialComponent());
    } else
      // in inline mode
      // create single page root file now and start component for display dispathing
      cpc = new HtmlStaticPageComponent("content", g_new_rootContainer);
      cpc.addListener(this);
      myContent.put("content", cpc);

      if (currentUri != null) {
        if (currentUri.charAt(0) == '/') {
          //strip beginning slash
          currentUri = currentUri.substring(1);
        }
        setCurURI(currentUri);
        cpc.setCurrentURI(currentUri);
      } else {
        // no bookmarked uri given
        setCurURI(startURI);
        cpc.setCurrentURI(startURI);
      }     
    } 
         
    mainP.setContent(myContent);
    setInitialComponent(mainP);
  }
View Full Code Here

Examples of org.olat.core.gui.components.panel.Panel

        return deliverFile(relPath, isPopUp);
      }     
    };
    baseURI = registerMapper(contentMapper);
    myContent.contextPut("baseURI", baseURI);
    newUriEventPanel = new Panel("newUriEvent");
    newUriEventPanel.setContent(eventVC);
   
    this.rootDir = rootDir;
    this.frameId = frameId;
    main = new Panel("iframemain");
    if (frameId == null) this.frameId = "ifdc" + hashCode();
    main.setContent(myContent);
    myContent.contextPut("frameId", this.frameId);
    myContent.put("newUriEvent", newUriEventPanel);
    // add default iframe height
View Full Code Here

Examples of org.olat.core.gui.components.panel.Panel

    // abstract class after this controller has been disposed
   
    if (initialComponent instanceof Panel) {
      wrapperPanel = (Panel) initialComponent;
    } else {
      wrapperPanel = new Panel("autowrapper of controller " + this.getClass().getName());
      wrapperPanel.setContent(initialComponent);
    }
    this.initialComponent = wrapperPanel;
  }
View Full Code Here

Examples of org.olat.core.gui.components.panel.Panel

              boolean wasDomR = toRender.isDomReplaceable();
              if (!wasDomR) {
                throw new AssertException("cannot replace as dom fragment:"+toRender.getComponentName()+" ("+toRender.getClass().getName()+"),"+toRender.getExtendedDebugInfo());
              }
             
              Panel wrapper = new Panel("renderpanel");
              wrapper.setDomReplaceable(false); // to omit <div> around the render helper panel
              RenderResult renderResult = null;
              StringOutput jsol = new StringOutput();
              StringOutput hdr = new StringOutput();
              String result = null;
              try {
                toRender.setDomReplaceable(false);
                wrapper.setContent(toRender);
                String newTimestamp = String.valueOf(timestamp);
                URLBuilder ubu = new URLBuilder(uriPrefix,getInstanceId(), newTimestamp,wbackofficeImpl);

                renderResult = new RenderResult();
View Full Code Here

Examples of org.olat.core.gui.components.panel.Panel

    super(ureq, wControl);
    myContent = createVelocityContainer("index");
    npeLink = LinkFactory.createLink("command.npe", myContent, this);
    assertLink = LinkFactory.createLink("command.assert", myContent, this);
    renderLink = LinkFactory.createLink("command.render", myContent, this);
    mainPanel = new Panel("homesitepanel");
    mainPanel.setContent(myContent);
   
    //add source view control
      Controller sourceview = new SourceViewController(ureq, wControl, this.getClass(), myContent);
      myContent.put("sourceview", sourceview.getInitialComponent());
View Full Code Here

Examples of org.opencustomer.framework.webapp.panel.Panel

    }
   
    @Override
    public void createEntity(ActionMessages errors, LoadForm form, Hashtable<String, Object> attributes, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
        UserVO activeUser = (UserVO) request.getSession().getAttribute(Globals.USER_KEY);
        Panel lastPanel = null;
        if(!Panel.getPanelStack(request).isEmpty())
            lastPanel = Panel.getPanelStack(request).peek();
       
        PersonVO person = new PersonVO();
       
View Full Code Here

Examples of org.openhab.binding.dscalarm.internal.model.Panel

      int zoneId;
      int keypadId = 1;
 
      switch (dscAlarmDeviceType) {
        case PANEL:
          Panel panel = null;
   
          //Right now we can only connect to one Panel so we only create a single Panel object;
          if(panelMap.isEmpty()) {
            panel = new Panel(panelId);
            panelMap.put(panelId, panel);
          }
          else {
            panel = panelMap.get(1);
          }
         
          if(config.getDSCAlarmItemType() == DSCAlarmItemType.PANEL_CONNECTION)
            updateDeviceProperties(item, config, connected ? 1:0, "Panel Connected");
 
          if((config.getDSCAlarmItemType() == DSCAlarmItemType.PANEL_MESSAGE) && (sysMessage != "")) {
            updateDeviceProperties(item, config, 0, sysMessage);
            sysMessage = "";
          }
 
          if(event != null) {
            panel.handleEvent(item, config, eventPublisher, event);
          }
          else {
            panel.refreshItem(item, config, eventPublisher);
          }
          break;
        case PARTITION:
          partitionId = config.getPartitionId();
          Partition partition = partitionMap.get(partitionId);
View Full Code Here

Examples of org.primefaces.component.panel.Panel

      for(DashboardColumn column : model.getColumns()) {
        writer.startElement("div", null);
        writer.writeAttribute("class", Dashboard.COLUMN_CLASS, null);
       
        for(String widgetId : column.getWidgets()) {
          Panel widget = findWidget(widgetId, dashboard);
         
          if(widget != null)
            renderChild(facesContext, widget);
        }
       
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.