Hi Leo,

a first idea would be to remember if validation was executed at all. If not, 
the state should be kept. I added a simple patch for this to the issue (it 
works for me but there might be side effects I'm not aware of).
 
Am 27.09.2011 um 16:23 schrieb Leonardo Uribe:

> Hi
> 
> Some weeks ago, I read the description of UIData.encodeBegin() too.
> 
> That description comes from JSF 1.0, so in that time it had sense, but
> with JSF 2.0 we have new use cases and that description is becoming
> problematic. For example, originally the idea was that if a
> conversion/validation error occur, an error message is added so the
> model/state must be preserved.
> 
> In JSF 2.0 we have FacesContext.isValidationFailed() method, so one
> idea is check this condition in that part, but still it seems to be
> insuficient. I suppose a change on the spec should be done in
> that part, but I still don't get how it should looks like. There are some
> cases like the one described on MYFACES-3326 that requires
> something "special", to indicate the model/state should not be
> cleared.
> 
> For now the only workaround is create a copy and implement
> UIData class and add some code there, just like in tomahawk, but
> that does not solve the problem on the spec.
> 
> Suggestions are welcome.
> 
> regards,
> 
> Leonardo Uribe
> 
> 2011/9/27 Michael Kurz <michi.k...@gmx.at>
>> 
>> Hi,
>> 
>> I would like to move the discussion about MYFACES-3326 ([1]) from the issue 
>> over her (as suggested by Mike).
>> 
>> I don't want to repeat the whole story, but I am very interested if this is 
>> a bug (probably not as Mojarra behaves the same way), if it is 
>> underspecified or if I wrongly assumed that this should work like I expected.
>> 
>> Best regards
>> Michael
>> 
>> [1]: https://issues.apache.org/jira/browse/MYFACES-3326

Reply via email to