I think the trick is to use hidden fields to maintain the state of the fields on the client side.
So, the process looks something like this:
user action -> update hidden values -> update interface
Then, when the page is sent back, you reinstall the user interface:
Page loading → interface update
chris source
share