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
cicap - 08 Sep 2006 19:40 GMT
> 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).
are you sure that your inputText has not required="true" ?
Christoph Dahlen - 09 Sep 2006 08:48 GMT
cicap schrieb:
> are you sure that your inputText has not required="true" ?
I am.
Gruss,
Christoph