Package com.liferay.faces.util.client

Examples of com.liferay.faces.util.client.ClientScript


  private static final String SCRIPT_DATA_FQCN = "com.liferay.portal.kernel.servlet.taglib.aui.ScriptData";

  @Override
  public ClientScript getClientScript(ExternalContext externalContext) throws FacesException {

    ClientScript clientScript = null;

    Map<String, Object> requestMap = externalContext.getRequestMap();
    Object attributeValue = requestMap.get(WebKeys.AUI_SCRIPT_DATA);

    if (LIFERAY_PORTAL_DETECTED) {
View Full Code Here


    // Render the script at the bottom of the page by setting the WebKeys.AUI_SCRIPT_DATA request attribute.
    ExternalContext externalContext = facesContext.getExternalContext();
    ClientScriptFactory clientScriptFactory = (ClientScriptFactory) FactoryExtensionFinder.getFactory(
        ClientScriptFactory.class);
    ClientScript clientScript = clientScriptFactory.getClientScript(externalContext);

    String portletId = StringPool.BLANK;
    Object portlet = externalContext.getRequestMap().get(WebKeys.RENDER_PORTLET);

    if (portlet != null) {
      portletId = LiferayPortletUtil.getPortletId(portlet);
    }

    clientScript.append(portletId, script, use);
  }
View Full Code Here

      FacesContext facesContext = FacesContext.getCurrentInstance();
      ExternalContext externalContext = facesContext.getExternalContext();
      ClientScriptFactory clientScriptFactory = (ClientScriptFactory) FactoryExtensionFinder.getFactory(
          ClientScriptFactory.class);
      ClientScript clientScript = clientScriptFactory.getClientScript(externalContext);
      super.write(clientScript.toString());
      super.endElement(StringPool.SCRIPT);
    }

    super.endElement(name);
  }
View Full Code Here

TOP

Related Classes of com.liferay.faces.util.client.ClientScript

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.