Cant execute actions with conditionally rendered buttons - Primefaces, JSF and Spring Session
Posted: 19 Apr 2017, 00:12
Versions:
Primefaces 6.0
JSF (myfaces) 2.2.12
spring-session 1.3.0.RELEASE
spring-session-data-redis 1.3.0.RELEASE
lettuce 3.5.0.FINAL
I'm having issues using the HttpSession (SpringSession - redis) to clusterize the session of my users. The issue behavior is very specific, but, to me, looks like the ViewState is not being recovered correctly.
In a page I have a button (primefaces, ajax), when I click this button it triggers a action in my managed bean and a dialog is show with a text derived by the action executed in my managed bean.
But, if I have a button that is dynamically rendered (rendered="#{someBean.someBooleanProperty}"), when a action renders this button, the button doesn't trigger any action in my managed bean.
After debugging the execution stack of JSF, I've seen that the dynamically generated button action triggers the JSF lifecycle, but the action never reaches the ManagedBean.
Everything works fine if I remove spring session.
I'm providing a sample application proving the issue. (at https://github.com/joaocarlos86/spring-session-problem).
Thanks in advance.
Primefaces 6.0
JSF (myfaces) 2.2.12
spring-session 1.3.0.RELEASE
spring-session-data-redis 1.3.0.RELEASE
lettuce 3.5.0.FINAL
I'm having issues using the HttpSession (SpringSession - redis) to clusterize the session of my users. The issue behavior is very specific, but, to me, looks like the ViewState is not being recovered correctly.
In a page I have a button (primefaces, ajax), when I click this button it triggers a action in my managed bean and a dialog is show with a text derived by the action executed in my managed bean.
But, if I have a button that is dynamically rendered (rendered="#{someBean.someBooleanProperty}"), when a action renders this button, the button doesn't trigger any action in my managed bean.
After debugging the execution stack of JSF, I've seen that the dynamically generated button action triggers the JSF lifecycle, but the action never reaches the ManagedBean.
Everything works fine if I remove spring session.
I'm providing a sample application proving the issue. (at https://github.com/joaocarlos86/spring-session-problem).
Thanks in advance.