I am using WebFlow and would like to add the current Locale into the flow.
I already have a resolveLocale method that does this with this signature:
public Locale resolveLocale (HttpServletRequest request);
I would like to add something like this in my WebFlow XML:
<on-start>
<evaluate expression="localeService.resolveLocale(???)" result="flowScope.locale"/>
</on-start>
Now, I don’t know what to put in the ??? parameter part.
Any ideas? Thanks for reading.
I haven’t used Web Flow, but presuming it’s similar to the rest of Spring, you can use the RequestContextHolder for this. A quick Google search suggests that Web Flow even gives you a web flow specific RequestContextHolder – even better