Package org.thymeleaf.standard.expression

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


        final IStandardExpression permissionsExpr =
                getExpressionDefaultToLiteral(expressionParser, configuration, arguments, permissionsExpression);

        final Object domainObject = domainObjectExpr.execute(configuration, arguments);
       
        final Object permissionsObject = permissionsExpr.execute(configuration, arguments);
        final String permissionsStr =
                (permissionsObject == null? null : permissionsObject.toString());

        return AclAuthUtils.authorizeUsingAccessControlList(
                domainObject, applicationContext, permissionsStr, authentication, servletContext);
View Full Code Here


    if (value.contains("${") || value.contains("@{") || value.contains("#{")) {
      Configuration configuration = arguments.getConfiguration();
      IStandardExpressionParser expressionParser = StandardExpressions.getExpressionParser(configuration);
      IStandardExpression standardExpression = expressionParser.parseExpression(configuration, arguments, value);
      result = standardExpression.execute(configuration, arguments);
    }
    else {
      result = value;
    }
   
View Full Code Here

               
                try {

                    final IStandardExpression expression =
                            expressionParser.parseExpression(configuration, arguments, match);
                    final Object result = expression.execute(configuration, arguments);

                    strBuilder.append(HtmlEscape.escapeHtml4Xml(String.valueOf(result)));
                   
                } catch (final TemplateProcessingException ignored) {
                   
View Full Code Here

                    strBuilder.append(SCRIPT_INLINE_PREFIX).append(match).append(SCRIPT_INLINE_SUFFIX);
                }

                if (expression != null) {
                    // If an exception raises during execution, we should let it through
                    final Object result = expression.execute(configuration, arguments);
                    strBuilder.append(formatEvaluationResult(result));
                }
               
                curr = matcher.end(0);
               
View Full Code Here

                FragmentSelectionUtils.parseFragmentSelection(configuration, processingContext, standardFragmentSpec);

        final IStandardExpression templateNameExpression = fragmentSelection.getTemplateName();
        final String templateName;
        if (templateNameExpression != null) {
            final Object templateNameObject = templateNameExpression.execute(configuration, processingContext);
            if (templateNameObject == null) {
                throw new TemplateProcessingException(
                        "Evaluation of template name from spec \"" + standardFragmentSpec + "\" " +
                                "returned null.");
            }
View Full Code Here

        final Map<String,Object> parameterValues = new HashMap<String, Object>(parameters.size() + 2);
        for (final Assignation assignation : parameters.getAssignations()) {

            final IStandardExpression parameterNameExpr = assignation.getLeft();
            final Object parameterNameValue = parameterNameExpr.execute(configuration, processingContext);

            final String parameterName = (parameterNameValue == null? null : parameterNameValue.toString());

            final IStandardExpression parameterValueExpr = assignation.getRight();
            final Object parameterValueValue = parameterValueExpr.execute(configuration, processingContext);
View Full Code Here

            final Object parameterNameValue = parameterNameExpr.execute(configuration, processingContext);

            final String parameterName = (parameterNameValue == null? null : parameterNameValue.toString());

            final IStandardExpression parameterValueExpr = assignation.getRight();
            final Object parameterValueValue = parameterValueExpr.execute(configuration, processingContext);

            parameterValues.put(parameterName, parameterValueValue);

        }
View Full Code Here

        final IStandardExpression expression = expressionParser.parseExpression(configuration, arguments, attributeValue);
       
        validateSelectionValue(arguments, element, attributeName, attributeValue, expression);
       
        return expression.execute(configuration, arguments);
       
    }

   
   
View Full Code Here

        final Map<String,Object> newLocalVariables = new HashMap<String,Object>(assignations.size() + 1, 1.0f);
        for (final Assignation assignation : assignations) {
           
            final IStandardExpression leftExpr = assignation.getLeft();
            final Object leftValue = leftExpr.execute(configuration, assignationExecutionArguments);

            final IStandardExpression rightExpr = assignation.getRight();
            final Object rightValue = rightExpr.execute(configuration, assignationExecutionArguments);

            final String newVariableName = (leftValue == null? null : leftValue.toString());
View Full Code Here

           
            final IStandardExpression leftExpr = assignation.getLeft();
            final Object leftValue = leftExpr.execute(configuration, assignationExecutionArguments);

            final IStandardExpression rightExpr = assignation.getRight();
            final Object rightValue = rightExpr.execute(configuration, assignationExecutionArguments);

            final String newVariableName = (leftValue == null? null : leftValue.toString());
            if (StringUtils.isEmptyOrWhitespace(newVariableName)) {
                throw new TemplateProcessingException(
                        "Variable name expression evaluated as null or empty: \"" + leftExpr + "\"");
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.