Grae Cullen wrote:Hi all,
Basically, my problem is that if the user click the one button, and does wait for the page to respond, and then clicks another button, it seems like there is a race condition.
How can I avoid the code for the first button press using the same variables as the code for the second button press?
I suspect that both requests are going to call the the same getters and setters in some random order, because each button click will be in a different phase of the JSF model.
Ok, here is an example, suppose the user clicks a button, the action function changes some variable. That variable is linked with a getter and a setter to an actuall jsf tag. Now suppose the action function is 50% complete. Now the user hits the same button. JSf will call the getters and the setters linked to that same variable, restoring the state or whatever. Basically, that variable is reset back to what it was before the action changed it.
Now the action function for the first click is continuing to run, and it changes that same variable again. Even with out the second action call, it is a race condition.
Dieter Quickfend wrote: