Prepare the value to pass up to the {@link AbstractCallMethod} type
parent.

@return {@link #EVAL_PAGE} to continue evaluating the page
5227
public int doEndTag()
            throws JspException {

        if(hasErrors())
            reportErrors();
        else {
            AbstractCallMethod cm = (AbstractCallMethod)getParent();
            cm.addParameter(_type, _isNull ? null : _value);
        }

        localRelease();
        return EVAL_PAGE;
    }
1214289
public int doEndTag()
            throws JspException
    {

        popIdScope();

        // writeout the script.
        WriteRenderAppender writer = new WriteRenderAppender(pageContext);

        // if we wrote out the scopeId then we end it.
        if (_idScope != null) {
            writer.append("</div>");
        }

        writeFrameworkScript(writer);
        writeAfterBlocks(writer);
        localRelease();
        return EVAL_PAGE;
    }
1349763
public void get(
    Object rootVal,
    MatchSpaceKey msg,
    EvalCache cache,
    Object contextValue,
    SearchResults result)
    throws MatchingException, BadMessageFormatMatchingException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      tc.entry(
          this,cclass,
        "get",
        "msg: " + msg + ", result: " + result);

    // type never used so removed
    //int type;

    List[] v = alwaysMatch.lists;
    if (v.length > 0)
      result.addObjects(v);

    if (msg != null)
    {
      int numExpr = roots.size();

      for (int current = 0; current < numExpr; current++)
      {
        Boolean res = null;

        // May need to call MFP multiple times, if our context has multiple nodes
        if(contextValue != null)
        {
          // Currently this must be a list of nodes
          if (contextValue instanceof SetValEvaluationContext)
          {
            SetValEvaluationContext evalContext = (SetValEvaluationContext)contextValue;
            
            // Get the node list
            ArrayList wrappedParentList = evalContext.getWrappedNodeList(); 
            // If the list is empty, then we have yet to get the document root
            if(wrappedParentList.isEmpty())
            {
        	    //Set up a root (document) context for evaluation
            	Object docRoot = Matching.getEvaluator().getDocumentRoot(msg);
                
                // Create an object to hold the wrapped node
                WrappedNodeResults wrapper = new WrappedNodeResults(docRoot);
                // Set the root into the evaluation context
                evalContext.addNode(wrapper);
            }
            
            // Iterate over the nodes
            Iterator iter = wrappedParentList.iterator();

            while(iter.hasNext())
            {
              WrappedNodeResults nextWrappedNode = (WrappedNodeResults)iter.next();       
              Object nextNode = nextWrappedNode.getNode();
                
                
              // If no cached value we'll need to call MFP
              //TODO: No caching here

              // Call MFP to get the results for this node
              res = 
                (Boolean) Matching.
                  getEvaluator().
                    eval((Selector) roots.get(current),
                         msg,
                         cache,
                         nextNode,
                         true); // Permissive is true  

              if(res !=null && res.booleanValue())
              {
                break;
              }     
     
            } // eof while
          } // eof instanceof XPathEvaluationContext
        }
        else
        {
          res = (Boolean) Matching.getEvaluator().eval(
              (Selector) roots.get(current),
              msg,
              cache,
              contextValue,
              false);            
        }
        
        if (res != null && res.booleanValue())
        {
          MatchTargetTypeList tlist = (MatchTargetTypeList) objs.get(current);
          v = tlist.lists;
          if (v.length > 0)
            result.addObjects(v);
        }
      }
    }
    // ContinueBranch has to be last to treat this node as if it was at the end of
    // a long chain of *, or a #.
    super.get(null, msg, cache, contextValue, result);

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      tc.exit(this,cclass, "get");

  }
455695
public Object evaluate(String pAttributeName,
                           String pAttributeValue,
                           Class pExpectedType,
                           Tag pTag,
                           PageContext pPageContext,
                           Map functions,
                           String defaultPrefix)
            throws JspException {
        try {
            return sEvaluator.evaluate
                    (pAttributeValue,
                            pPageContext,
                            pExpectedType,
                            functions,
                            defaultPrefix);
        }
        catch (ELException exc) {
            throw new JspException
                    (MessageFormat.format
                            (Constants.ATTRIBUTE_EVALUATION_EXCEPTION,
                                            "" + pAttributeName,
                                            "" + pAttributeValue,
                                            exc.getMessage(),
                                    exc.getRootCause()), exc.getRootCause());
        }
    }
63840
public void run()
    {
        if(evalOnly)
            throw new RuntimeException("bsh Interpreter: No stream");

        /*
          We'll print our banner using eval(String) in order to
          exercise the parser and get the basic expression classes loaded...
          This ameliorates the delay after typing the first statement.
        */
        if ( interactive && null == getParent() ) try {
            eval("printBanner();");
        } catch ( EvalError e ) {
            println( "BeanShell " + VERSION );
        }

        // init the callstack.
        CallStack callstack = new CallStack( globalNameSpace );

        SimpleNode node = null;
        EOF = false;
        int idx = -1;
        while( !Thread.interrupted() && !EOF )
        {
            try
            {
                if ( interactive )
                    console.prompt(getBshPrompt());

                EOF = readLine();

                if( get_jjtree().nodeArity() > 0 )  // number of child nodes
                {

                    node = (SimpleNode) (get_jjtree().rootNode());
                    // nodes remember from where they were sourced
                    node.setSourceFile( sourceFileInfo );

                    if( DEBUG.get() )
                        node.dump(">");
                    if ( TRACE )
                        println( "// " +node.getText() );


                    Object ret = node.eval( callstack, this );

                    // sanity check during development
                    if ( callstack.depth() > 1 )
                        throw new InterpreterError(
                            "Callstack growing: "+callstack);

                    if(ret instanceof ReturnControl)
                        ret = ((ReturnControl)ret).value;

                    if (interactive) {
                        if( ret != Primitive.VOID )
                        {
                            setu("$_", ret);
                            setu("$"+(++idx%10), ret);
                            if ( showResults )
                                println("--> $" + (idx%10) + " = " + StringUtil.typeValueString(ret));
                        } else if ( showResults )
                            println("--> void");
                    }
                }
            }
            catch(ParseException e)
            {
                error("Parser Error: " + e.getMessage(DEBUG.get()));
                if ( DEBUG.get() )
                    e.printStackTrace();
                if( !interactive )
                    EOF = true;
                parser.reInitInput(getIn());
            }
            catch(InterpreterError e)
            {
                error("Internal Error: " + e.getMessage());
                if(!interactive)
                    EOF = true;
            }
            catch(TargetError e)
            {
                error("Target Exception: " + e.getMessage() );
                if ( e.inNativeCode() )
                    e.printStackTrace( DEBUG.get(), getErr() );
                if(!interactive)
                    EOF = true;
                setu("$_e", e.getTarget());
            }
            catch (EvalError e)
            {
                if ( interactive )
                    error( "Evaluation Error: "+e.getMessage() );
                else
                    error( "Evaluation Error: "+e.getRawMessage() );
                if(DEBUG.get())
                    e.printStackTrace();
                if(!interactive)
                    EOF = true;
            }
            catch(Exception e)
            {
                error("Unknown error: " + e);
                if ( DEBUG.get() )
                    e.printStackTrace();
                if(!interactive)
                    EOF = true;
            }
            finally
            {
                get_jjtree().reset();
                // reinit the callstack
                if ( callstack.depth() > 1 ) {
                    callstack.clear();
                    callstack.push( globalNameSpace );
                }
            }
        }

        if ( interactive && exitOnEOF )
            System.exit(0);
    }
82582
public int doStartTag()
            throws JspException {
        Object source = evaluateDataSource();

        // report any errors that may have occured 
        if(hasErrors())
            return SKIP_BODY;

        _renderState = INIT;

        boolean empty = false;
        if(source != null) {
            _iterator = IteratorFactory.createIterator(source);
            if(_iterator == null) {
                LOGGER.warn(Bundle.getString("Tags_Repeater_nullIterator"));
                _iterator = Collections.EMPTY_LIST.iterator();
            }

            if(_iterator.hasNext()) {
                _currentIndex = 0;
                _currentItem = _iterator.next();

                if(_ignoreNulls && _currentItem == null) {
                    /*
                      doStartTag doesn't know if the repeater is structured or unstructured
                      thus, if ignoreNulls is true, it's going to make an attempt to go
                      through the body with a non-null item.  if there are no non-null
                      items in the data structure, the doAfterBody method will handle
                      this correctly, but a data structure with a null first item
                      will render the same as a data structure with a null second item
                     */
                    advanceToNonNullItem();

                    /*
                       this null check needs to re-run here because the advanceToNonNullItem method
                       side-effects the _currentItem.
                     */
                    if(_currentItem == null)
                        empty = true;
                }
            }
            /* there is no data set of there are zero items in the iterator */
            else empty = true;
        }
        /* the dataSource evaluated to null */
        else {
            _iterator = Collections.EMPTY_LIST.iterator();
            empty = true;
        }

        if(empty) {
            /* if the defaultText attribute is non-null, it will be evaluated as an expression and rendered to the page */
            if(_defaultText != null)
                addContent(_defaultText.toString());
            return SKIP_BODY;
        }
        else {
            DataAccessProviderStack.addDataAccessProvider(this, pageContext);
            _containerInPageContext = true;
            return EVAL_BODY_BUFFERED;
        }
    }
380304
protected Double eval(final Object[] _value)
    {
        final Double ret;

        if (_value == null) {
            ret = null;
        } else if ((_value[0] instanceof String) && (((String) _value[0]).length() > 0)) {
            ret = Double.parseDouble((String) _value[0]);
        } else if (_value[0] instanceof Number) {
            ret = ((Number) _value[0]).doubleValue();
        } else  {
            ret = null;
        }

        return ret;
    }
622511
@Override
    public int doStartTag() throws JspException {

	try {
	    conn = getConnection();
	} catch (SQLException e) {
	    throw new JspException(sql + ": " + e.getMessage(), e);
	}

	return EVAL_BODY_BUFFERED;
    }
371855
public static Object evaluate(String attributeName,
                                  String expression,
                                  Class expectedType,
                                  PageContext pageContext)
            throws JspException {

        return evaluate(attributeName, expression, expectedType, null, pageContext);
    }
163056
public int doEndTag() throws JspException
    {
        Tag parent = getParent();
        if (parent instanceof CheckBoxGroup)
            registerTagError(Bundle.getString("Tags_CheckBoxGroupChildError"), null);

        Object val = evaluateDataSource();
        if (hasErrors())
            return reportAndExit(EVAL_PAGE);

        ByRef ref = new ByRef();
        nameHtmlControl(_state, ref);

        String hiddenParamName = _state.name + OLDVALUE_SUFFIX;
        ServletRequest req = pageContext.getRequest();

        if (val instanceof String) {
            if (val != null && Boolean.valueOf(val.toString()).booleanValue())
                _state.checked = true;
            else
                _state.checked = false;
        }
        else if (val instanceof Boolean) {
            _state.checked = ((Boolean) val).booleanValue();
        }
        else {
            String oldCheckBoxValue = req.getParameter(hiddenParamName);
            if (oldCheckBoxValue != null) {
                _state.checked = new Boolean(oldCheckBoxValue).booleanValue();
            }
            else {
                _state.checked = evaluateDefaultValue();
            }
        }
        _state.disabled = isDisabled();

        //Create a hidden field to store the CheckBox oldValue
        String oldValue = req.getParameter(_state.name);
        WriteRenderAppender writer = new WriteRenderAppender(pageContext);

        // if the checkbox is disabled we need to not write out the hidden
        // field because it can cause the default state to change from
        // true to false.  Disabled check boxes do not postback.
        if (!_state.disabled) {
            _hiddenState.name = hiddenParamName;
            if (oldValue == null) {
                _hiddenState.value = "false";
            }
            else {
                _hiddenState.value = oldValue;
            }
            TagRenderingBase hiddenTag = TagRenderingBase.Factory.getRendering(TagRenderingBase.INPUT_HIDDEN_TAG, req);
            hiddenTag.doStartTag(writer, _hiddenState);
            hiddenTag.doEndTag(writer);
        }

        _state.type = INPUT_CHECKBOX;

        TagRenderingBase br = TagRenderingBase.Factory.getRendering(TagRenderingBase.INPUT_BOOLEAN_TAG, req);
        br.doStartTag(writer, _state);

        if (!ref.isNull())
            write((String) ref.getRef());

        // Continue processing this page
        localRelease();
        return EVAL_PAGE;
    }
565371
@Override
    public int doEndTag() throws JspException {

        Tag t = findAncestorWithClass(this, I_CmsJspTagParamParent.class);
        if (t == null) {
            throw new JspTagException(Messages.get().getBundle(pageContext.getRequest().getLocale()).key(
                Messages.ERR_PARENTLESS_TAG_1,
                new Object[] {"param"}));
        }
        // take no action for null or empty names
        if (CmsStringUtil.isEmpty(m_name)) {
            return EVAL_PAGE;
        }

        // send the parameter to the appropriate ancestor
        I_CmsJspTagParamParent parent = (I_CmsJspTagParamParent)t;
        String value = m_value;
        if (value == null) {
            if ((bodyContent == null) || (bodyContent.getString() == null)) {
                value = "";
            } else {
                value = bodyContent.getString().trim();
            }
        }
        if (m_encode) {
            parent.addParameter(
                CmsEncoder.encode(m_name, OpenCms.getSystemInfo().getDefaultEncoding()),
                CmsEncoder.encode(value, OpenCms.getSystemInfo().getDefaultEncoding()));
        } else {
            parent.addParameter(m_name, value);
        }

        return EVAL_PAGE;
    }
217576
def evaluate(parent, indent)
      # Accept eval or multiline eval syntax and return a new node,
      return unless accept :eval

      multiline = accept(:text)

      if multiline
        # Get first evaluation line
        evaluate_code = accept(:line_feed) || ''

        # Get all the lines which are more indented than the current one
        eval_node = [:evaluate, evaluate_code.strip, {}, nil, indent]
        eval_node[@value] += accept(:newline) || ''
        eval_node[@value] += get_indented_lines(indent)
      else
        evaluate_code = accept(:line_feed) || ''
        eval_node = [:evaluate, evaluate_code.strip, {}, [], indent]

        root eval_node, indent
      end

      parent[@children] << eval_node
    end
1283329
protected AstEval eval(boolean required, boolean deferred) throws ScanException, ParseException {
		AstEval v = null;
		Symbol start_eval = deferred ? START_EVAL_DEFERRED : START_EVAL_DYNAMIC;
		if (token.getSymbol() == start_eval) {
			consumeToken();
			v = new AstEval(expr(true), deferred);
			consumeToken(END_EVAL);
		} else if (required) {
			fail(start_eval);
		}
		return v;
	}
800430
Class evalReturnType( CallStack callstack, Interpreter interpreter )
        throws EvalError
    {
        insureNodesParsed();
        if ( returnTypeNode != null )
            return returnTypeNode.evalReturnType( callstack, interpreter );
        else
            return null;
    }
36091
@Override
    public int doStartTag() {

        if (CmsFlexController.isCmsRequest(pageContext.getRequest())) {
            m_paramState = new ParamState(
                CmsFlexController.getController(pageContext.getRequest()).getCurrentRequest());
            m_paramState.init();
        }
        return EVAL_BODY_BUFFERED;
    }
1069101
public Object evaluate()
  {
    if( !isCompileTimeConstant() )
    {
      return super.evaluate();
    }

    return (Boolean)getLHS().evaluate() || (Boolean)getRHS().evaluate();
  }
215352
private void evaluateExpressions() throws JspException {
        if (valueEL != null) {
            value = (Date) ExpressionEvaluatorManager.evaluate(
                    "value", valueEL, Date.class, this, pageContext);
        }

        if (typeEL != null) {
            type = (String) ExpressionEvaluatorManager.evaluate(
                    "type", typeEL, String.class, this, pageContext);
        }
    }