Hello community,
I have a curious decode problem with myfaces:
First, i submit a form, with custom component. One form entry is
invalid. Custom component decode() gets called, then it's
getConvertedValue(), whcih throws a ConvertException. JSF properly
redisplay form, with submitted values, and the conversion error message
At second step:
I fix my value (remove letters in a decimal type field) and submit.
At that point, for reasons i couldn't explain, the JSF threat this like
a request for a new view instead of a restore view. As such, decode() is
not called, and all the values are taken back from my backing bean,
invalidation everything user submitted. I added a classical
<h:inputText> field linked to a backing bean String value, this one
shows same behaviour (reset to backing bean instead of applying user
submitted value).
Can someone explain me whyn after throwin a ConverterException from
getConvertedValue() the view gets invalidaed by JSF?
Thanks a lot, am out of ideas to locate problem...
For information:
extract of jsf form:
<h:form id="parameterTestForm" enctype="multipart/form-data">
<s:parameter popupDocument="/select.jsp"
value="#{parameterTestBean.parameters[0]}" id="myArray"/>
(Parameter 0 value is
#{parameterTestBean.parameters[0].value}, name is
#{parameterTestBean.parameters[0].name})
<br/>
.....
<h:inputText id="marker"
value="#{parameterTestBean.parameters[8].name}"/> ....
#{parameterTestBean.parameters[8].name}
<br/>
<h:commandButton value="test" action="test" id="test"/>
</h:form>
--
http://www.devlog.be (a belgian developer's logs)