Closed joaocarlos86 closed 4 years ago
The problem still occur if I switch my components from p:commandButton to h:commandButton and f:ajax, so, this is not related to primefaces. I've tried 2 JSF implementations: mojara and myfaces, so, it looks like not being a JSF related issue...
@joaocarlos86, were you able to solve this problem?
I encounter similar problems using primefaces 6.2 The <p:ajax event="rowSelect" listener="#{controller.handleEvent}
does invoke the event handleEvent(SelectEvent event)
method, however event.getObject() is null. The issue is resolved if disable the springSessionRepositoryFilter
in web.xml
Any idea why this filter breaks the primefaces ajax calls?
Can someone put together a complete and minimal sample of the problem you are encountering?
It looks like the primefaces application is behaving a bit different because the HttpServletRequest
is now inside SessionRepositoryRequestWrapper
. For some reason it now triggers the APPLY_REQUEST_VALUES phase. This causes my LazyDataModel
to load again also invoking getRowData(String rowId)
.
My LazyDataModel implementation was using an instance field holding all the entries. The getRowData
method was looping through these entries. Somehow the instancefield was null during the apply request values phase. I refactored the implementation so the getRowData
is now directly invoking a repository to fetch the required entry. This fixes the problem for me.
I hope it will be of use if anyone has a similar issue
Thanks for the response @dvtoever. I'll leave this open to give others a chance to produce a minimal sample.
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.
Versions:
Primefaces 6.0 JSF (myfaces) 2.3 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, 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)