Immediate Action and page fragment refresh
I have a problem and do not know how to get arround it.
Lets say I have a page (A.jsp) including a page fragment (B.jspf) with an input field (lastname). Lastname is bound to a variable in the SessionBean. The page also has a cancel button.
The idea of the page is that the user can modify data, but if he does not like his current changes, he presses the cancel button and the original data is beeing displayed again.
So in the action listener for the cancel button I reload the data from the database and update the lastname variable in the sesion bean, then return null to redisplay the page.
public String cancel_button_action(){
getSessionBean1().refreshPerson();
returnnull;
}
That works basically as expected. When I press the cancel button, the visible data is beeing completely refreshed.
Now the problem starts if I set the "Immediate Action" property for the cancel button. If I press the cancel button now the fields are still showing the partly modified data which I entered before pressing the cancel button.
The reason for setting the immediate action property is because some fields in the page fragment have validators in place and I do not want them to fire messages if I want to refresh the page.
So my question is, is this a known problem or a feature and how can I get arround it?
Thanks,
Ulf

