/** * <p> * Get the {@link IThymeleafRequestContext} from the Thymeleaf context. * </p> * <p> * The returned object is a wrapper on the Spring request context that hides the fact of this request * context corresponding to a Spring WebMVC or Spring WebFlux application. * </p> * <p> * This will be done by looking for a context variable called * {@link SpringContextVariableNames#THYMELEAF_REQUEST_CONTEXT}. * </p> * * @param context the context * @return the thymeleaf request context */ public static IThymeleafRequestContext getRequestContext(final IExpressionContext context) { if (context == null) { return null; } return (IThymeleafRequestContext) context.getVariable(SpringContextVariableNames.THYMELEAF_REQUEST_CONTEXT); }
private static TypeConverter getSpringConversionService(final IExpressionContext context) { final EvaluationContext evaluationContext = (EvaluationContext) context.getVariable( ThymeleafEvaluationContext.THYMELEAF_EVALUATION_CONTEXT_CONTEXT_VARIABLE_NAME); if (evaluationContext != null) { return evaluationContext.getTypeConverter(); } return null; }
private static TypeConverter getSpringConversionService(final IExpressionContext context) { final EvaluationContext evaluationContext = (EvaluationContext) context.getVariable( ThymeleafEvaluationContext.THYMELEAF_EVALUATION_CONTEXT_CONTEXT_VARIABLE_NAME); if (evaluationContext != null) { return evaluationContext.getTypeConverter(); } return null; }
private static TypeConverter getSpringConversionService(final IExpressionContext context) { final EvaluationContext evaluationContext = (EvaluationContext) context.getVariable( ThymeleafEvaluationContext.THYMELEAF_EVALUATION_CONTEXT_CONTEXT_VARIABLE_NAME); if (evaluationContext != null) { return evaluationContext.getTypeConverter(); } return null; }
private static TypeConverter getSpringConversionService(final IExpressionContext context) { final EvaluationContext evaluationContext = (EvaluationContext) context.getVariable( ThymeleafEvaluationContext.THYMELEAF_EVALUATION_CONTEXT_CONTEXT_VARIABLE_NAME); if (evaluationContext != null) { return evaluationContext.getTypeConverter(); } return null; }
private static TypeConverter getSpringConversionService(final IExpressionContext context) { final EvaluationContext evaluationContext = (EvaluationContext) context.getVariable( ThymeleafEvaluationContext.THYMELEAF_EVALUATION_CONTEXT_CONTEXT_VARIABLE_NAME); if (evaluationContext != null) { return evaluationContext.getTypeConverter(); } return null; }
(VariableExpression) context.getVariable(SpringContextVariableNames.SPRING_BOUND_OBJECT_EXPRESSION);
/** * Constructor, obtains the current theme and locale from the processing * context for code lookups later. * * @param context the processing context being used */ public Themes(final IExpressionContext context) { super(); this.locale = context.getLocale(); final RequestContext requestContext = (RequestContext) context.getVariable(SpringContextVariableNames.SPRING_REQUEST_CONTEXT); this.theme = requestContext != null ? requestContext.getTheme() : null; }
(VariableExpression) context.getVariable(SpringContextVariableNames.SPRING_BOUND_OBJECT_EXPRESSION);
(VariableExpression) context.getVariable(SpringContextVariableNames.SPRING_BOUND_OBJECT_EXPRESSION);
(VariableExpression) context.getVariable(SpringContextVariableNames.SPRING_BOUND_OBJECT_EXPRESSION);
(VariableExpression) context.getVariable(SpringContextVariableNames.SPRING_BOUND_OBJECT_EXPRESSION);
/** * Constructor, obtains the current theme and locale from the processing * context for code lookups later. * * @param context the processing context being used */ public Themes(final IExpressionContext context) { super(); this.locale = context.getLocale(); final RequestContext requestContext = (RequestContext) context.getVariable(SpringContextVariableNames.SPRING_REQUEST_CONTEXT); this.theme = requestContext != null ? requestContext.getTheme() : null; }
/** * Constructor, obtains the current theme and locale from the processing * context for code lookups later. * * @param context the processing context being used */ public Themes(final IExpressionContext context) { super(); this.locale = context.getLocale(); final RequestContext requestContext = (RequestContext) context.getVariable(SpringContextVariableNames.SPRING_REQUEST_CONTEXT); this.theme = requestContext != null ? requestContext.getTheme() : null; }
/** * Constructor, obtains the current theme and locale from the processing * context for code lookups later. * * @param context the processing context being used */ public Themes(final IExpressionContext context) { super(); this.locale = context.getLocale(); final RequestContext requestContext = (RequestContext) context.getVariable(SpringContextVariableNames.SPRING_REQUEST_CONTEXT); this.theme = requestContext != null ? requestContext.getTheme() : null; }
(IThymeleafBindStatus) context.getVariable(SpringContextVariableNames.THYMELEAF_FIELD_BIND_STATUS); if (bindStatus != null) { return bindStatus; (VariableExpression) context.getVariable(SpringContextVariableNames.SPRING_BOUND_OBJECT_EXPRESSION);
(BindStatus) context.getVariable(SpringContextVariableNames.SPRING_FIELD_BIND_STATUS); if (bindStatus != null) { return bindStatus; (VariableExpression) context.getVariable(SpringContextVariableNames.SPRING_BOUND_OBJECT_EXPRESSION);
(BindStatus) context.getVariable(SpringContextVariableNames.SPRING_FIELD_BIND_STATUS); if (bindStatus != null) { return bindStatus; (VariableExpression) context.getVariable(SpringContextVariableNames.SPRING_BOUND_OBJECT_EXPRESSION);
(RequestContext) context.getVariable(SpringContextVariableNames.SPRING_REQUEST_CONTEXT); if (requestContext == null) { return null;
(RequestContext) context.getVariable(SpringContextVariableNames.SPRING_REQUEST_CONTEXT); if (requestContext == null) { return null;