On Wed, 2008-03-26 at 13:32 -0700, mjovanov wrote: > > > > > > That did it, thank you very much! Sorry, I didn't see your message before > creating a sample demo app and posting my last message. > > Just so I understand this correctly: why exactly does resetting the > components submittedValue to null force the getter to be called during > render-response? I mean, shouldn't that happen anyway?
The point of the submittedValue is that if the user types in some garbage, eg alpha characters into a text field, then when the page is re-rendered the component should redisplay exactly what the user typed, not blank the field out or restore it to the current value for the model. Example: The field initially renders the value "7". I replace this with "zzz" and click "save". The page then re-displays with an error message, eg "invalid input in field X". What should be displayed is my bad "zzz", not "7" again, otherwise I cannot see what I did wrong. So: if validation fails, then components do NOT evaluate their value EL expression, but just use the submittedValue. In this case, it is not validation failing, but some confusion over the rendered state. However the effect ends up the same: the component did not push its cached data into the model, so redisplays the cached value instead of refetching it. Regards, Simon

