I have a page with 2 buttons (called previous and next ). And inside that page, I have a region *(region1)* with the page fragment which is showing data (let's assume employees data). When I click next, the region will show the next employee's data. And for previous, it will show previous employee's data. And there are fields to be filled out for each employee, and fields have validations also. For previous button, we use immediate="true" to *skip validation* because for previous button, there will be no validations.
Whenever we pressed these buttons, we refresh the *region1* through region binding (eg., this.getMyRegion().refresh(FacesContext.getCurrentInstance())), and show the new data.
For *next* button, it is working fine.
The *PROBLEM* is that *when I press the previous button, the components inside the region are NOT refreshed with the new data. They are still showing the old data*. One interesting thing is that components with *readonly="true"* are showing the *correct data*.
When I searched about that issue, some suggests that it's because components' *local value* are not cleared when using immediate button.
I tried with <af:resetActionListener /> for the commandbutton (as below). But it's not working.