You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I agree that would be a worthwhile goal. For example adding this element should plug in all additional configuration required for processing JSF 2 requests:
faces:jsf-request-handling/
That raises a couple of extra questions:
An AjaxHandler may be set on a FlowHandlerAdapter but also on FlowController of which there could be more than one. A reasonable default for that might be set all FlowControllers and allow customizing the list of FlowController bean id's.
Since FlowExecutor instances are typically defined with a custom namespace element, faces:jsf-request-handling/ would have to appear below any flow:executor/ elements. However relying on the order of elements is unusual in Spring configuration. The only other solution I see is providing a faces:flow-executor.
A <faces:resources /> custom namespace element is now available that is equivalent to this configuration:
<bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="order" value="0"/>
<property name="mappings" value="/javax.faces.resource/**=jsfResourceHandler"/>
</bean>
<bean class="org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter" />
<bean id="jsfResourceHandler" class="org.springframework.faces.webflow.FacesJsfResourceRequestHandler"/>
2. JsfFlowHandlerAdapter can now be used instead of FlowHandlerAdapter to ensure a JsfAjaxHandler is used by default with JSF 2.
An IllegalStateException with a helpful message is thrown if FacesContext is null when processing a Web Flow request to suggest configuring a FlowFacesContextLifecycleListener.
Note that #2 and #3 were not covered by any custom namespace elements. Hopefully the provided solution is a good balance between simple and flexible.
Rossen Stoyanchev opened SWF-1375 and commented
Affects: 2.1.1
Issue Links:
("depends on")
The text was updated successfully, but these errors were encountered: