C
Christoph Dahlen
Hi,
I noticed a problem from "old school" JSP times is also present in JSF.
Assume I have a Managed Bean in my session names "myBean". Also assume
that I have bound the property "prop" of myBean to a <h:inputText>
component.
<h:inputText value="#{myBean.prop}" />
Now, when I enter some text into the generated HTML <input> field and
send the form, this text is - of course - written into the assigned
property.
But, when - after this - I clear the HTML <input> field and send the
form again, the properties value is _not_ removed, the appropriate
setter is not called, when the input from the <input> field is empty
(that is: null or zero-length string).
Can this be avoided?
Gruß,
Christoph
I noticed a problem from "old school" JSP times is also present in JSF.
Assume I have a Managed Bean in my session names "myBean". Also assume
that I have bound the property "prop" of myBean to a <h:inputText>
component.
<h:inputText value="#{myBean.prop}" />
Now, when I enter some text into the generated HTML <input> field and
send the form, this text is - of course - written into the assigned
property.
But, when - after this - I clear the HTML <input> field and send the
form again, the properties value is _not_ removed, the appropriate
setter is not called, when the input from the <input> field is empty
(that is: null or zero-length string).
Can this be avoided?
Gruß,
Christoph