Your original set of assumptions is true, so far as I know.
If there's no model-update phase, but the component passed validation,
then it'll use the local value.


On 12/9/05, Matthias Kahlau <[EMAIL PROTECTED]> wrote:
> > > - if submitted value is null, renders its local value, if not null
> >
> > Yep.
> >
> > Note, however, that in the "update model" phase, if there is an
> > associated value-binding then the local value is pushed into the model
> > and the local value is immediately set to null. See UIInput.updateModel.
> >
> > So in the render phase, the local value will only be non-null for
> > components that have no value-binding for the "value" attribute.
>
>
> But what happens, if I set the component immediate attribute to true? Then
> conversion and validation of the submitted value will be processed in the
> apply request values phase. That's why I think the local value is set to the
> submitted value in this phase, if no conversion or validation error occurs
> (I haven't investigated the source code).
>
> When I now jump directly from the apply request values phase to the render
> response phase in the same lifecycle (e.g. in an immediate value change
> listener method calling renderResponse()), then no update of the model value
> occurs. In this case, it seems that the local value will be fetched in the
> render response phase, despite of the component having a value-binding for
> the "value" attribute?!
>
>
> Regards,
> Matthias
>
> > -----Ursprüngliche Nachricht-----
> > Von: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] Auftrag
> > von Simon Kitching
> > Gesendet: Freitag, 9. Dezember 2005 03:04
> > An: MyFaces Discussion
> > Betreff: Re: rendering behavior of EditableValueHolders
> >
> >
> > Matthias Kahlau wrote:
> > > Hi!
> > >
> > >
> > > Can somebody confirm or correct what I found out about the rendering
> > > behavior of EditableValueHolders:
> > >
> > > - renders its submitted value, if not null
> >
> > Yep. This allows values that fail validation to be re-rendered rather
> > than just "disappearing".
> >
> > Note that when validation succeeds, the submitted value is immediately
> > set to null.
> >
> > > - if submitted value is null, renders its local value, if not null
> >
> > Yep.
> >
> > Note, however, that in the "update model" phase, if there is an
> > associated value-binding then the local value is pushed into the model
> > and the local value is immediately set to null. See UIInput.updateModel.
> >
> > So in the render phase, the local value will only be non-null for
> > components that have no value-binding for the "value" attribute.
> >
> > > - if both values are null, renders the value of the tags value attribute
> >
> > Yep. Well, I would put it as "fetches the value from the model via the
> > associated value-binding, if any".
> >
> >
> > Well, that's how I understand it anyway. Corrections welcome.
> >
> > Cheers,
> >
> > Simon
>
>

Reply via email to