Package javax.el

Examples of javax.el.VariableMapper


      return SKIP_BODY;

    _isLast = _currentIndex == _currentEnd;

    // Save off the previous deferred variables
    VariableMapper vm =
      pageContext.getELContext().getVariableMapper();
    if (_var != null)
      _previousDeferredVar = vm.resolveVariable(_var);

    if (null != _varStatus)
    {
      _previousDeferredVarStatus = vm.resolveVariable(_varStatus);
      _propertyReplacementMap = new HashMap<String, Object>(9, 1);
      _propertyReplacementMap.put("begin", Integer.valueOf(_currentBegin));
      _propertyReplacementMap.put("end", Integer.valueOf(_currentEnd));
      _propertyReplacementMap.put("step", Integer.valueOf(_currentStep));
      _propertyReplacementMap.put("count", Integer.valueOf(_currentCount));
View Full Code Here


    // If we're at the end, bail
    if (_currentEnd < _currentIndex)
    {
      // Restore EL state
      VariableMapper vm =
        pageContext.getELContext().getVariableMapper();
      if (_var != null)
        vm.setVariable(_var, _previousDeferredVar);
      if (_varStatus != null)
        vm.setVariable(_varStatus, _previousDeferredVarStatus);

      return SKIP_BODY;
    }
   
    // Otherwise, update the variables and go again
View Full Code Here

  }

  // Push new values into the VariableMapper and the pageContext
  private void _updateVars()
  {
    VariableMapper vm =
      pageContext.getELContext().getVariableMapper();
    if (_var != null)
    {
      // Catch programmer error where _var has been set but
      // _items has not
      if (_items != null)
      {
        ValueExpression iterated = new IndexedValueExpression(_items,
                                                              _currentIndex);
        vm.setVariable(_var, iterated);
      }
     
      // Ditto (though, technically, one check for
      // _items is sufficient, because if _items evaluated
      // to null, we'd skip the whole loop)
      Object items = _itemsValue;
      if (items != null)
      {
        Object item;
        if (items instanceof List)
          item = ((List) items).get(_currentIndex);
        else
          item = Array.get(items, _currentIndex);

        pageContext.setAttribute(_var, item);
      }
    }
   
    if (_varStatus != null)
    {
      pageContext.setAttribute(_varStatus, _propertyReplacementMap);
      ValueExpression constant = new Constants(
                                      new HashMap(_propertyReplacementMap));
      vm.setVariable(_varStatus, constant);
    }
  }
View Full Code Here

            // According to UserTagHandler, in this point we need to wrap the facelet
            // VariableMapper, so local changes are applied on "page context", but
            // data is retrieved from full context
            FaceletContext faceletContext = (FaceletContext) context.
                getAttributes().get(FaceletContext.FACELET_CONTEXT_KEY);
            VariableMapper orig = faceletContext.getVariableMapper();
            try
            {
                faceletContext.setVariableMapper(new VariableMapperWrapper(orig));
               
                compositeComponentBase.pushComponentToEL(context, compositeComponentBase);
View Full Code Here

        {
            if (path == null || path.length() == 0)
            {
                return;
            }
            VariableMapper orig = ctx.getVariableMapper();
            ctx.setVariableMapper(new VariableMapperWrapper(orig));
            try
            {
                //Only ui:param could be inside ui:include.
                //this.nextHandler.apply(ctx, null);
View Full Code Here

                mctx.addAttachedObjectHandler(
                        compositeComponentBase, it.next());
            }
        }   
       
        VariableMapper orig = faceletContext.getVariableMapper();
        try
        {
            faceletContext.setVariableMapper(new VariableMapperWrapper(orig));
            actx.pushCompositeComponentClient(this);
            actx.applyCompositeComponent(compositeFacetPanel, _resource);
View Full Code Here

            Object obj = null;
            if (ctx.isLambdaArgument(this.localName)) {
                obj = ctx.getLambdaArgument(this.localName);
            }
            if (obj == null) {
                VariableMapper varMapper = ctx.getVariableMapper();
                if (varMapper != null) {
                    obj = varMapper.resolveVariable(this.localName);
                    if (obj instanceof ValueExpression) {
                        // See if this returns a LambdaEXpression
                        obj = ((ValueExpression) obj).getValue(ctx);
                    }
                }
View Full Code Here

  public ExpressionBuilder(String expression, ELContext ctx)
      throws ELException {
    this.expression = expression;

    FunctionMapper ctxFn = ctx.getFunctionMapper();
    VariableMapper ctxVar = ctx.getVariableMapper();

    if (ctxFn != null) {
      this.fnMapper = new FunctionMapperFactory(ctxFn);
    }
    if (ctxVar != null) {
View Full Code Here

    public ExpressionBuilder(String expression, ELContext ctx)
            throws ELException {
        this.expression = expression;

        FunctionMapper ctxFn = ctx.getFunctionMapper();
        VariableMapper ctxVar = ctx.getVariableMapper();

        if (ctxFn != null) {
            this.fnMapper = new FunctionMapperFactory(ctxFn);
        }
        if (ctxVar != null) {
View Full Code Here

            // According to UserTagHandler, in this point we need to wrap the facelet
            // VariableMapper, so local changes are applied on "page context", but
            // data is retrieved from full context
            FaceletContext faceletContext = (FaceletContext) context.
                getAttributes().get(FaceletContext.FACELET_CONTEXT_KEY);
            VariableMapper orig = faceletContext.getVariableMapper();
            try
            {
                faceletContext.setVariableMapper(new VariableMapperWrapper(orig));
               
                compositeComponentBase.pushComponentToEL(context, compositeComponentBase);
View Full Code Here

TOP

Related Classes of javax.el.VariableMapper

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.