I have the following problem and I could not find a solution anywhere.
I have the following code:
<h:inputText id="username" value="#{registrationBB.userName}" binding="#{userNameToConfirm}"/>
and later on:
<h:inputSecret id="confirmed-password" value="#{registrationBB.userPasswordConfirmed}">
<f:validator validatorId="usernameNotInPasswordValidator"/>
<f:attribute name="username" value="#{userNameToConfirm.value}" />
</h:inputSecret>
The inputText is bound to #{userNameToConfirm} (which is not a property in any backingbean) and later this binding is used in the password validator.
This all works well.
But, the form that these fields are on contains a “Reset” button, that should empty all fields on the form.
When the reset button is clicket, all properties in the registrationBB are emptied and the following code is called:
getViewRoot().getChildren().clear();
But, the username will never be empty, because it will always be set by the value in the “#userNameToConfirm” binding.
My question is: How can I access this binding and delete in the faces back-end?
We use jsf version 1.2.
regards,
arash
Let the reset button reload the page instead.
Or by a
<navigation-case>with a<redirect>.with