New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No easy way to "reset" an input component #67
Comments
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented This checkin implements the reset feature for UIInput. idea: adam.winer M src/javax/faces/component/UIInput.java
// Skip update on an invalid value |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
|
I've seen a lot of users looking for a way to take an input field and "reset" it back to its initial state
(talking back to the ValueBinding).
This processing code commonly would live in an actionListener for an immediate UICommand. The first
problem they run into (but don't understand) is that submittedValue is non-null at this point, so their
attempts to call setValue(), etc., are futile. If they get past that (and ignore the Javadoc warning users
not to call setSubmittedValue()!), then there's the subtleties of isLocalValueSet().
A band-aid for the problem would be adding some sort of "reset()" or "resetValue()" to UIInput that
would call the following three methods:
Environment
Operating System: All
Platform: All
Affected Versions
[1.1]
The text was updated successfully, but these errors were encountered: