Package org.apache.myfaces.portlet.faces.el

Examples of org.apache.myfaces.portlet.faces.el.PortletELContextImpl


  public ELContext getELContext()
  {
    if (mElContext == null)
    {
      Application app = getApplication();
      mElContext = new PortletELContextImpl(app.getELResolver());
      mElContext.putContext(FacesContext.class, this);
      UIViewRoot root = getViewRoot();
      if (null != root)
      {
        mElContext.setLocale(root.getLocale());
View Full Code Here


   
    // Make sure our bridge instance is handling this context
    String portletName = (String) ((FacesContext) elContext.getContext(FacesContext.class)).getExternalContext().getRequestMap().get(PORTLET_NAME_ATTRIBUTE);
    if (portletName != null && portletName.equals(mPortletConfig.getPortletName()))
    {
      PortletELContextImpl portletELContext;
      if (elContext instanceof PortletELContextImpl)
      {
        // Grr -- turns out that by the time my resolver is called the ELContext may
        // have been wrapped -- so mark here as a FacesResolver and then do a put context
        portletELContext = (PortletELContextImpl) elContext;
        portletELContext.setFacesResolved(true);
        // Put the portletConfig object into this Map
        portletELContext.setPortletConfig(mPortletConfig);

      }
      else
      {
        // create a PortletELContext to hold future resolver state and place on this context
        portletELContext = new PortletELContextImpl(elContext.getELResolver());
        portletELContext.setFacesResolved(false);
      }
      elContext.putContext(PortletELContextImpl.class, portletELContext);
    }
  }
View Full Code Here

  public ELContext getELContext()
  {
    if (mElContext == null)
    {
      Application app = getApplication();
      mElContext = new PortletELContextImpl(app.getELResolver());
      mElContext.putContext(FacesContext.class, this);
      UIViewRoot root = getViewRoot();
      if (null != root)
      {
        mElContext.setLocale(root.getLocale());
View Full Code Here

   
    // Make sure our bridge instance is handling this context
    String portletName = (String) ((FacesContext) elContext.getContext(FacesContext.class)).getExternalContext().getRequestMap().get(PORTLET_NAME_ATTRIBUTE);
    if (portletName != null && portletName.equals(mPortletConfig.getPortletName()))
    {
      PortletELContextImpl portletELContext;
      if (elContext instanceof PortletELContextImpl)
      {
        // Grr -- turns out that by the time my resolver is called the ELContext may
        // have been wrapped -- so mark here as a FacesResolver and then do a put context
        portletELContext = (PortletELContextImpl) elContext;
        portletELContext.setFacesResolved(true);
        // Put the portletConfig object into this Map
        portletELContext.setPortletConfig(mPortletConfig);

      }
      else
      {
        // create a PortletELContext to hold future resolver state and place on this context
        portletELContext = new PortletELContextImpl(elContext.getELResolver());
        portletELContext.setFacesResolved(false);
      }
      elContext.putContext(PortletELContextImpl.class, portletELContext);
    }
  }
View Full Code Here

  public ELContext getELContext()
  {
    if (mElContext == null)
    {
      Application app = getApplication();
      mElContext = new PortletELContextImpl(app.getELResolver());
      // Use one set as current instance in case we are wrapped
      mElContext.putContext(FacesContext.class, FacesContext.getCurrentInstance());
      UIViewRoot root = getViewRoot();
      if (null != root)
      {
View Full Code Here

   
    // Make sure our bridge instance is handling this context
    String portletName = (String) ((FacesContext) elContext.getContext(FacesContext.class)).getExternalContext().getRequestMap().get(PORTLET_NAME_ATTRIBUTE);
    if (portletName != null && portletName.equals(mPortletConfig.getPortletName()))
    {
      PortletELContextImpl portletELContext;
      if (elContext instanceof PortletELContextImpl)
      {
        // Grr -- turns out that by the time my resolver is called the ELContext may
        // have been wrapped -- so mark here as a FacesResolver and then do a put context
        portletELContext = (PortletELContextImpl) elContext;
        portletELContext.setFacesResolved(true);
        // Put the portletConfig object into this Map
        portletELContext.setPortletConfig(mPortletConfig);

      }
      else
      {
        // create a PortletELContext to hold future resolver state and place on this context
        portletELContext = new PortletELContextImpl(elContext.getELResolver());
        portletELContext.setFacesResolved(false);
      }
      elContext.putContext(PortletELContextImpl.class, portletELContext);
    }
  }
View Full Code Here

  public ELContext getELContext()
  {
    if (mElContext == null)
    {
      Application app = getApplication();
      mElContext = new PortletELContextImpl(app.getELResolver());
      // Use one set as current instance in case we are wrapped
      mElContext.putContext(FacesContext.class, FacesContext.getCurrentInstance());
      UIViewRoot root = getViewRoot();
      if (null != root)
      {
View Full Code Here

   
    // Make sure our bridge instance is handling this context
    String portletName = (String) ((FacesContext) elContext.getContext(FacesContext.class)).getExternalContext().getRequestMap().get(PORTLET_NAME_ATTRIBUTE);
    if (portletName != null && portletName.equals(mPortletConfig.getPortletName()))
    {
      PortletELContextImpl portletELContext;
      if (elContext instanceof PortletELContextImpl)
      {
        // Grr -- turns out that by the time my resolver is called the ELContext may
        // have been wrapped -- so mark here as a FacesResolver and then do a put context
        portletELContext = (PortletELContextImpl) elContext;
        portletELContext.setFacesResolved(true);
        // Put the portletConfig object into this Map
        portletELContext.setPortletConfig(mPortletConfig);

      }
      else
      {
        // create a PortletELContext to hold future resolver state and place on this context
        portletELContext = new PortletELContextImpl(elContext.getELResolver());
        portletELContext.setFacesResolved(false);
      }
      elContext.putContext(PortletELContextImpl.class, portletELContext);
    }
  }
View Full Code Here

  public ELContext getELContext()
  {
    if (mElContext == null)
    {
      Application app = getApplication();
      mElContext = new PortletELContextImpl(app.getELResolver());
      mElContext.putContext(FacesContext.class, this);
      UIViewRoot root = getViewRoot();
      if (null != root)
      {
        mElContext.setLocale(root.getLocale());
View Full Code Here

   
    // Make sure our bridge instance is handling this context
    String portletName = (String) ((FacesContext) elContext.getContext(FacesContext.class)).getExternalContext().getRequestMap().get(PORTLET_NAME_ATTRIBUTE);
    if (portletName != null && portletName.equals(mPortletConfig.getPortletName()))
    {
      PortletELContextImpl portletELContext;
      if (elContext instanceof PortletELContextImpl)
      {
        // Grr -- turns out that by the time my resolver is called the ELContext may
        // have been wrapped -- so mark here as a FacesResolver and then do a put context
        portletELContext = (PortletELContextImpl) elContext;
        portletELContext.setFacesResolved(true);
        // Put the portletConfig object into this Map
        portletELContext.setPortletConfig(mPortletConfig);

      }
      else
      {
        // create a PortletELContext to hold future resolver state and place on this context
        portletELContext = new PortletELContextImpl(elContext.getELResolver());
        portletELContext.setFacesResolved(false);
      }
      elContext.putContext(PortletELContextImpl.class, portletELContext);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.portlet.faces.el.PortletELContextImpl

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.