Package org.thymeleaf.standard.expression

Examples of org.thymeleaf.standard.expression.IStandardExpression.execute()


        } else {
            statusVarValue = null;
        }

        final IStandardExpression iterableExpr = each.getIterable();
        final Object iteratedValue = iterableExpr.execute(configuration, arguments);

        final String iterVarName = (iterVarValue == null? null : iterVarValue.toString());
        if (StringUtils.isEmptyOrWhitespace(iterVarName)) {
            throw new TemplateProcessingException(
                    "Iteration variable name expression evaluated as null: \"" + iterVarExpr + "\"");
View Full Code Here


        final Configuration configuration = arguments.getConfiguration();
        final IStandardExpressionParser expressionParser = StandardExpressions.getExpressionParser(configuration);

        final String attributeValue = element.getAttributeValue(attributeName);
        final IStandardExpression expression = expressionParser.parseExpression(configuration, arguments, attributeValue);
        final Object value = expression.execute(configuration, arguments);

        return EvaluationUtil.evaluateAsBoolean(value);
       
    }
View Full Code Here

        final Configuration configuration = arguments.getConfiguration();
        final IStandardExpressionParser expressionParser = StandardExpressions.getExpressionParser(configuration);

        final IStandardExpression expression = expressionParser.parseExpression(configuration, arguments, attributeValue);

        final Object result = expression.execute(configuration, arguments);
        return (result == null? "" : result.toString());

    }

View Full Code Here

      final Configuration configuration = theArguments.getConfiguration();
      final IStandardExpressionParser expressionParser = StandardExpressions.getExpressionParser(configuration);

      final IStandardExpression expression = expressionParser.parseExpression(configuration, theArguments, attributeValue);
      final Object value = expression.execute(configuration, theArguments);
     
      theElement.removeAttribute(theAttributeName);
      theElement.clearChildren();

      if (value == null) {
View Full Code Here

        final IStandardExpressionParser expressionParser = StandardExpressions.getExpressionParser(configuration);

        final IStandardExpression expression = expressionParser.parseExpression(configuration, arguments, attributeValue);

        final Object result =
                expression.execute(configuration, arguments, StandardExpressionExecutionContext.UNESCAPED_EXPRESSION);

        return (result == null? "" : result.toString());

    }
View Full Code Here

      final Configuration configuration = theArguments.getConfiguration();
      final IStandardExpressionParser expressionParser = StandardExpressions.getExpressionParser(configuration);

      final IStandardExpression expression = expressionParser.parseExpression(configuration, theArguments, attributeValue);
      final Object value = expression.execute(configuration, theArguments);

      theElement.removeAttribute(theAttributeName);
      theElement.clearChildren();

      if (value == null) {
View Full Code Here

      final Configuration configuration = theArguments.getConfiguration();
      final IStandardExpressionParser expressionParser = StandardExpressions.getExpressionParser(configuration);

      final IStandardExpression expression = expressionParser.parseExpression(configuration, theArguments, attributeValue);
      final Object value = expression.execute(configuration, theArguments);


      theElement.removeAttribute(theAttributeName);
      theElement.clearChildren();
View Full Code Here

      final Configuration configuration = theArguments.getConfiguration();
      final IStandardExpressionParser expressionParser = StandardExpressions.getExpressionParser(configuration);

      final IStandardExpression expression = expressionParser.parseExpression(configuration, theArguments, attributeValue);
      final Object value = expression.execute(configuration, theArguments);


      theElement.removeAttribute(theAttributeName);
      theElement.clearChildren();
View Full Code Here

    for (Attribute attribute : attributeMap.values()) {
      if (dialectPrefix.equals(Attribute.getPrefixFromAttributeName(attribute.getNormalizedName()))) {
        final String newVariableName = Attribute.getUnprefixedAttributeName(attribute.getOriginalName());
        final IStandardExpression expression = expressionParser.parseExpression(arguments.getConfiguration(),
            withExecutionArguments, attribute.getValue());
        final Object newVariableValue = expression.execute(configuration, withExecutionArguments);
        withExecutionArguments = withExecutionArguments.addLocalVariables(Collections.singletonMap(newVariableName,
            newVariableValue));
        newLocalVariables.put(newVariableName, newVariableValue);
        element.removeAttribute(attribute.getNormalizedName());
      }
View Full Code Here

      final Configuration configuration = theArguments.getConfiguration();
      final IStandardExpressionParser expressionParser = StandardExpressions.getExpressionParser(configuration);

      final IStandardExpression expression = expressionParser.parseExpression(configuration, theArguments, attributeValue);
      final Object value = expression.execute(configuration, theArguments);
     
      theElement.removeAttribute(theAttributeName);
      theElement.clearChildren();

      if (value == null) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.