Package org.thymeleaf.standard.expression

Examples of org.thymeleaf.standard.expression.IStandardExpressionParser.parseExpression()


        final String attributeValue = element.getAttributeValue(attributeName);

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

        final IStandardExpression expression = expressionParser.parseExpression(configuration, arguments, attributeValue);
       
        final Set<String> newAttributeNames =
                getModifiedAttributeNames(arguments, element, attributeName, attributeValue, expression);

        final Object valueForAttributes = expression.execute(configuration, arguments);
View Full Code Here


        final String attributeValue = element.getAttributeValue(attributeName);

        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, StandardExpressionExecutionContext.UNESCAPED_EXPRESSION);

        return (result == null? "" : result.toString());
View Full Code Here

        final String attributeValue = element.getAttributeValue(attributeName);

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

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

        final boolean visible = EvaluationUtil.evaluateAsBoolean(value);
       
        if (inverse()) {
View Full Code Here

        final String attributeValue = element.getAttributeValue(attributeName);

        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);

        if (result == null) {
            return RemovalType.NONE;
View Full Code Here

        }

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

        final IStandardExpression caseExpression = expressionParser.parseExpression(configuration, arguments, attributeValue);
       
        final EqualsExpression equalsExpression = new EqualsExpression(switchStructure.getExpression(), caseExpression);

        final Object value = equalsExpression.execute(configuration, arguments);
View Full Code Here

  public static Object getEvaluatedAttributeValue(final Arguments arguments, final String attributeValue) {
    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;
  }
View Full Code Here

        String productString = element.getAttributeValue("product");

        if (productString != null) {
            final IStandardExpressionParser expressionParser = StandardExpressions.getExpressionParser(arguments.getConfiguration());
            Expression expression = (Expression) expressionParser.parseExpression(arguments.getConfiguration(), arguments, productString);
            Object product = expression.execute(arguments.getConfiguration(), arguments);

            if (product != null) {
                mvelParameters.put("product", product);
            }
View Full Code Here

        String categoryString = element.getAttributeValue("category");

        if (categoryString != null) {
            final IStandardExpressionParser expressionParser = StandardExpressions.getExpressionParser(arguments.getConfiguration());
            Expression expression = (Expression) expressionParser.parseExpression(arguments.getConfiguration(), arguments, productString);
            Object category = expression.execute(arguments.getConfiguration(), arguments);
            if (category != null) {
                mvelParameters.put("category", category);
            }
        }
View Full Code Here

           
            String orderNumberExpression = element.getAttributeValue("ordernumber");
            String orderNumber = null;
            if (orderNumberExpression != null) {
                final IStandardExpressionParser expressionParser = StandardExpressions.getExpressionParser(arguments.getConfiguration());
                Expression expression = (Expression) expressionParser.parseExpression(arguments.getConfiguration(), arguments, orderNumberExpression);
                orderNumber = (String) expression.execute(arguments.getConfiguration(), arguments);
            }
           
            Order order = null;
            if (orderNumber != null) {
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

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.