Very interesting - wouldn't see what would cause this. Can you debug
through the first phase of JSF (restore-view) to see what happens?

In the end, the state will be restored if you do have a
javax.faces.ViewState parameter send along, and this parameter can
properly be decrypted into an object-tree.

Exception: you might have a phase-listener configured which does something else?

regards,

Martin

On 10/10/07, David Delbecq <[EMAIL PROTECTED]> wrote:
> 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)
>
>
>


-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Reply via email to