Package javax.faces.context

Examples of javax.faces.context.FlashFactory


    }

    @Override
    public Flash getFlash() {
        if (null == flash) {
            FlashFactory ff = (FlashFactory) FactoryFinder.getFactory(FactoryFinder.FLASH_FACTORY);
            flash = ff.getFlash(true);
        }
        return flash;
    }
View Full Code Here


    }

    @Override
    public Flash getFlash() {
        if (null == flash) {
            FlashFactory ff = (FlashFactory) FactoryFinder.getFactory(FactoryFinder.FLASH_FACTORY);
            flash = ff.getFlash(true);
        }
        return flash;
    }
View Full Code Here

            // stored in request scope via the "flash.now"
            // expression, to flash scope.
            result = base;
            // Set a flag so the flash itself can look in the request
            // and promote the value to the next request
            FlashFactory ff = (FlashFactory)
                    FactoryFinder.getFactory(FactoryFinder.FLASH_FACTORY);
            ff.getFlash(true);
            ELFlash.setKeepFlag(facesContext);
        }
        // Otherwise, if base is the flash, and property is "now"...
        else if (property.toString().equals(FLASH_NOW_VARIABLE_NAME))
        {
View Full Code Here

    }

    @Override
    public Flash getFlash() {
        if (null == flash) {
            FlashFactory ff = (FlashFactory) FactoryFinder.getFactory(FactoryFinder.FLASH_FACTORY);
            flash = ff.getFlash(true);
        }
        return flash;
    }
View Full Code Here

    }

    @Override
    public Flash getFlash() {
        if (null == flash) {
            FlashFactory ff = (FlashFactory) FactoryFinder.getFactory(FactoryFinder.FLASH_FACTORY);
            flash = ff.getFlash(true);
        }
        return flash;
    }
View Full Code Here

        FacesContext facesContext =
                (FacesContext) elContext.getContext(FacesContext.class);
        ExternalContext extCtx = facesContext.getExternalContext();

        // try to get the flash from the session.
        FlashFactory ff = (FlashFactory)
                FactoryFinder.getFactory(FactoryFinder.FLASH_FACTORY);
        Map<String, Object> flash = ff.getFlash(false);
       
        elContext.setPropertyResolved(true);
       
        if (null == flash)
        {
          // create a new one and store it in the session.
          flash = ff.getFlash(true);
          extCtx.getSessionMap().put(ELFlash.FLASH_ATTRIBUTE_NAME, flash);
        }
       
        result = flash;
      }
    }
    // If the base argument is the flash itself...
    else if (base instanceof Flash)
    {
      FacesContext facesContext =
              (FacesContext) elContext.getContext(FacesContext.class);
      ExternalContext extCtx = facesContext.getExternalContext();

      // try to get the flash from the session.
      FlashFactory ff = (FlashFactory)
              FactoryFinder.getFactory(FactoryFinder.FLASH_FACTORY);
      Map<String, Object> flash = ff.getFlash(false);

      if (base == flash)
      {
        // and the property argument is "keep"...
        if (property.toString().equals(FLASH_KEEP_VARIABLE_NAME))
        {
          elContext.setPropertyResolved(true);
         
          // then this is a request to promote the value
          // "property", which is assumed to have been previously
          // stored in request scope via the "flash.now"
          // expression, to flash scope.
          result = base;
          // Set a flag so the flash itself can look in the request
          // and promote the value to the next request
          ff.getFlash(true);
          ELFlash.setKeepFlag(facesContext);
        }
        // Otherwise, if base is the flash, and property is "now"...
        else if (property.toString().equals(FLASH_NOW_VARIABLE_NAME))
        {
View Full Code Here

   */
  @Override
  public Flash getFlash() {

    if (flash == null) {
      FlashFactory flashFactory = (FlashFactory) FactoryFinder.getFactory(FactoryFinder.FLASH_FACTORY);
      flash = flashFactory.getFlash(true);
    }

    return flash;
  }
View Full Code Here

TOP

Related Classes of javax.faces.context.FlashFactory

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.