Package org.exoplatform.web.application

Examples of org.exoplatform.web.application.JavascriptManager


         uiWorkingWS.findFirstComponentOfType(UIPortalComposer.class).setRendered(false);
         uiWorkingWS.setRenderedChild(UIPortalApplication.UI_VIEWING_WS_ID);
         UIPortalToolPanel toolPanel = uiWorkingWS.findFirstComponentOfType(UIPortalToolPanel.class);
         toolPanel.setUIComponent(null);
         pcontext.addUIComponentToUpdateByAjax(uiWorkingWS);
         JavascriptManager jsManager = event.getRequestContext().getJavascriptManager();
         jsManager.addJavascript("eXo.portal.portalMode=" + UIPortalApplication.NORMAL_MODE + ";");
      }
View Full Code Here


         PortalRequestContext prContext = Util.getPortalRequestContext();
         UIPortalNavigation uiNavigation = event.getSource();

         uiNavigation.loadTreeNodes();

         JavascriptManager jsManager = prContext.getJavascriptManager();
         jsManager.addJavascript("eXo.portal.UIPortal.isExpandAll=false;");

         event.getRequestContext().addUIComponentToUpdateByAjax(uiNavigation);
      }
View Full Code Here

         uiNavigation.loadTreeNodes();
         TreeNode treeNode = uiNavigation.getTreeNodes();

         expandAllNode(treeNode);

         JavascriptManager jsManager = prContext.getJavascriptManager();
         jsManager.addJavascript("eXo.portal.UIPortal.isExpandAll=true;");

         event.getRequestContext().addUIComponentToUpdateByAjax(uiNavigation);
      }
View Full Code Here

    public Text generateRenderMarkup(PortletInvocationResponse pir, WebuiRequestContext context) {
        PortalRequestContext prcontext = (PortalRequestContext) context;

        Text markup = null;
        if (pir instanceof FragmentResponse) {
            JavascriptManager jsMan = context.getJavascriptManager();
            jsMan.loadScriptResource(ResourceScope.PORTLET, getApplicationId());

            FragmentResponse fragmentResponse = (FragmentResponse) pir;
            switch (fragmentResponse.getType()) {
                case FragmentResponse.TYPE_CHARS:
                    markup = Text.create(fragmentResponse.getContent());
                    break;
                case FragmentResponse.TYPE_BYTES:
                    markup = Text.create(fragmentResponse.getBytes(), Charset.forName("UTF-8"));
                    break;
                case FragmentResponse.TYPE_EMPTY:
                    markup = Text.create("");
                    break;
            }
            setConfiguredTitle(fragmentResponse.getTitle());

            // setup portlet properties
            if (fragmentResponse.getProperties() != null) {
                // setup transport headers
                if (fragmentResponse.getProperties().getTransportHeaders() != null) {
                    MultiValuedPropertyMap<String> transportHeaders = fragmentResponse.getProperties().getTransportHeaders();
                    for (String key : transportHeaders.keySet()) {
                        if (JAVASCRIPT_DEPENDENCY.equals(key)) {
                            for (String value : transportHeaders.getValues(key)) {
                                jsMan.require(value);
                            }
                        } else {
                            for (String value : transportHeaders.getValues(key)) {
                                prcontext.getResponse().setHeader(key, value);
                            }
View Full Code Here

            value = HTMLEntityEncoder.getInstance().encodeHTMLAttribute(value);
        } else {
            value = "";
        }

        JavascriptManager jsManager = context.getJavascriptManager();
        jsManager.require("SHARED/uiCalendar", "uiCalendar").addScripts(
                "uiCalendar.setFirstDayOfWeek(" + Calendar.getInstance(context.getLocale()).getFirstDayOfWeek() + ");");
        Writer w = context.getWriter();

        w.write("<input type=\"text\" onfocus='eXo.webui.UICalendar.init(this,");
        w.write(String.valueOf(isDisplayTime_));
View Full Code Here

        }
        return sb.toString();
    }

    public void processRender(WebuiRequestContext context) throws Exception {
        JavascriptManager jsManager = context.getJavascriptManager();
        jsManager.require("SHARED/webui-ext", "webuiExt").addScripts("webuiExt.UICombobox.init('" + getId() + "');");
        Writer w = context.getWriter();
        String options = "[";
        String text = "<div class='UIComboboxComponent'><div class='UIComboboxList'><div class='UIComboboxContainer'><div class='UIComboboxItemContainer'>";
        for (SelectItemOption item : options_) {
            options += "'" + item.getLabel() + "',";
View Full Code Here

    private int size() {
        return colors_.length;
    }

    public void processRender(WebuiRequestContext context) throws Exception {
        JavascriptManager jsManager = context.getJavascriptManager();
        jsManager.require("SHARED/webui-ext");
        String value = getValue();
        if (value != null) {
            value = HTMLEntityEncoder.getInstance().encode(value);
        }
        Writer w = context.getWriter();
View Full Code Here

      {
         value = "";
      }
     

      JavascriptManager jsManager = context.getJavascriptManager();
      jsManager.loadScriptResource("webui-ext");
      jsManager.addJavascript("eXo.webui.UICalendar.setFirstDayOfWeek(" + Calendar.getInstance(context.getLocale()).getFirstDayOfWeek() + ");");
      Writer w = context.getWriter();

      w.write("<input type=\"text\" onfocus='eXo.webui.UICalendar.init(this,");
      w.write(String.valueOf(isDisplayTime_));
      w.write(",\"");
View Full Code Here

      return sb.toString();
   }

   public void processRender(WebuiRequestContext context) throws Exception
   {
      JavascriptManager jsManager = context.getJavascriptManager();
      jsManager.loadScriptResource("webui-ext");
      jsManager.addJavascript("eXo.webui.UICombobox.init('" + getId() + "');");
      Writer w = context.getWriter();
      String options = "[";
      String text =
         "<div class='UIComboboxComponent'><div class='UIComboboxList'><div class='UIComboboxContainer'><div class='UIComboboxItemContainer'>";
      for (SelectItemOption item : options_)
View Full Code Here

      return colors_.length;
   }

   public void processRender(WebuiRequestContext context) throws Exception
   {
      JavascriptManager jsManager = context.getJavascriptManager();
      jsManager.loadScriptResource("webui-ext");
      String value = getValue();
      if (value != null)
      {
         value = HTMLEntityEncoder.getInstance().encode(value);
      }
View Full Code Here

TOP

Related Classes of org.exoplatform.web.application.JavascriptManager

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.