No easy way to "reset" an input component #67
Comments
Reported by adamwiner |
Issue-Links: |
@edburns said: |
@edburns said: |
@edburns said: |
@edburns said: This checkin implements the reset feature for UIInput. idea: adam.winer M src/javax/faces/component/UIInput.java
// Skip update on an invalid value |
@edburns said: |
@edburns said: |
@edburns said: |
Marked as fixed on Thursday, March 4th 2010, 6:09:29 am |
@manfredriem said: |
This issue was imported from java.net JIRA JAVASERVERFACES_SPEC_PUBLIC-67 |
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: