I've did a page via JSF where the user can enter some values in a form. If the user is fine with the input, he can click a submit-button which updates the Model with the new values.
What I'm trying to achieve is: I want that the validation of the input is triggered every time, the user enters a sign into the input field. But at this time, the model should NOT be updated. The model should only be updated, if the user clicks the submit-button. I want this behaviour for a better userexperience. The user should have the ability e.g. to press the Back-Button in the browser and his changes are not attached to the model. Also I want the user to see at inputtime, if he enters some bullshit.
Currently my JSF-File looks like this:
<h:inputText
required="true"
requiredMessage="Please enter a value."
id="input_value" value="#{myBean.myValue}"
styleClass="input"
validatorMessage="Please enter a value." >
<f:ajax
event="keyup"
execute="input_value"
render="input_value"/>
</h:inputText>
This triggers the validation everytime the user enters a sign into the input field. But it also updates the model. And thats not what I want.