Package org.apache.myfaces.trinidad.skin

Examples of org.apache.myfaces.trinidad.skin.SkinFactory


   * calling this method.
   */
  static public void registerBaseSkins()
  {

    SkinFactory skinFactory = SkinFactory.getFactory();

    // skinFactory should be non-null when this is called since it is
    // initiated in the TrinidadFilterImpl, but in case it isn't do this
    if (skinFactory == null)
    {
View Full Code Here


   */
  static public void registerSkinExtensions(
    ExternalContext context)
  {

    SkinFactory skinFactory = SkinFactory.getFactory();

    // skinFactory should be non-null when this is called since it is
    // initiated in the TrinidadFilterImpl, but in case it isn't do this
    if (skinFactory == null)
    {
View Full Code Here

   * calling this method.
   */
  static public void registerBaseSkins()
  {

    SkinFactory skinFactory = SkinFactory.getFactory();

    // skinFactory should be non-null when this is called since it is
    // initiated in the TrinidadFilterImpl, but in case it isn't do this
    if (skinFactory == null)
    {
View Full Code Here

   */
  static public void registerSkinExtensions(
    ExternalContext context)
  {

    SkinFactory skinFactory = SkinFactory.getFactory();

    // skinFactory should be non-null when this is called since it is
    // initiated in the TrinidadFilterImpl, but in case it isn't do this
    if (skinFactory == null)
    {
View Full Code Here

  }

  protected Skin getSkin(FacesContext context)
  {
    Skin skin = null;
    SkinFactory skinFactory = SkinFactory.getFactory();
    Object skinIdObj = context.getExternalContext().getRequestParameterMap().
      get("skinId");
    if (skinIdObj != null)
      skin = skinFactory.getSkin(context, skinIdObj.toString());

    return skin;
  }
View Full Code Here

      // get rid of this bit of code. Should we use getViewRoot().getRenderKitId() instead?
      renderKitId = XhtmlConstants.APACHE_TRINIDAD_PDA;
    }


    SkinFactory factory = SkinFactory.getFactory();
    if (factory == null)
    {
      if (_LOG.isWarning())
        _LOG.warning("There is no SkinFactory");
      return;
    }

    Skin skin = null;

    // see if there is a skinID on the requestParameterMap. If there is, then
    // we want to use that skin. Otherwise, use find the skin as usual, using the portlet
    // renderKitId.
    if (CoreRenderKit.OUTPUT_MODE_PORTLET.equals(getOutputMode()))
    {
      Map<String, Object> requestMap = context.getExternalContext().getRequestMap();
      Object skinId = requestMap.get(_SKIN_ID_PARAM);
      if (skinId != null)
      {
        skin = factory.getSkin(context, skinId.toString());
      }

    }

    if (skin == null)
      skin = factory.getSkin(null, skinFamily, renderKitId);

    if (skin == null)
    {
      if (_LOG.isWarning())
        _LOG.warning("Could not get skin " + skinFamily +
View Full Code Here

      // Get the requested Skin Id from the request Map
      Object requestedSkinId = requestMap.get(_SKIN_ID_PARAM);
      if (requestedSkinId != null)
      {
        SkinFactory factory = SkinFactory.getFactory();
        if (factory == null)
        {
          _LOG.warning("NO_SKIN_FACTORY");
          return null;
        }

        Skin requestedSkin = factory.getSkin(context, requestedSkinId.toString());
        if (requestedSkin != null)
        {
          // Get the skin's stylesheet id from the request Map and then compare it
          // to the local skin's stylesheet id to make sure they match.
          Object requestMapStyleSheetId = requestMap.get(_SKIN_STYLESHEET_ID_PARAM);
View Full Code Here

      // get rid of this bit of code. Should we use getViewRoot().getRenderKitId() instead?
      renderKitId = XhtmlConstants.APACHE_TRINIDAD_PDA;
    }


    SkinFactory factory = SkinFactory.getFactory();
    if (factory == null)
    {
      _LOG.warning("NO_SKIN_FACTORY");
      return;
    }

    Skin skin = factory.getSkin(null, skinFamily, renderKitId);

    if (skin == null)
    {
      if (_LOG.isWarning())
        _LOG.warning("CANNOT_GET_SKIN_FROM_SKINFACTORY", skinFamily);
View Full Code Here

      FacesContext context = getFacesContext();
      Object requestedSkinId = getRequestMapSkinId(context);
      if (requestedSkinId != null)
      {

        SkinFactory factory = SkinFactory.getFactory();
        if (factory == null)
        {
          _LOG.warning("NO_SKIN_FACTORY");
          return null;
        }
       
        Skin requestedSkin = factory.getSkin(context, requestedSkinId.toString());
        if (requestedSkin != null)
        {
          // In portlet mode, we will switch to using the requestedSkin
          // (the skin requested by the portlet's producer on the requestMap) if it exists.
          // Otherwise we'll use the portal skin.
View Full Code Here

      // get rid of this bit of code. Should we use getViewRoot().getRenderKitId() instead?
      renderKitId = TrinidadRenderingConstants.APACHE_TRINIDAD_PDA;
    }


    SkinFactory factory = SkinFactory.getFactory();
    if (factory == null)
    {
      _LOG.warning("NO_SKIN_FACTORY");
      return;
    }

    Skin skin = factory.getSkin(context, skinFamily, renderKitId, skinVersionString);

    if (skin == null)
    {
      if (_LOG.isWarning())
        _LOG.warning("CANNOT_GET_SKIN_FROM_SKINFACTORY", skinFamily);
View Full Code Here

TOP

Related Classes of org.apache.myfaces.trinidad.skin.SkinFactory

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.