You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Aneesha Govil <po...@gmail.com> on 2006/11/14 12:41:14 UTC

JSF Lifecycle question

Hi,

How is it determined which components need to be reloaded when a component
is submitted or an action is executed?

I cannot get my JSF page to reload a datatable that uses component binding
on page submit. Does using sub-views affect any behaviour, i.e., only the
subview is refreshed, the other components retain old values?

Please help!
Thanks,
Aneesha

Re: JSF Lifecycle question

Posted by David Delbecq <de...@oma.be>.
Upon submit, if all validation went successful, each component store
it's current internal in the backing bean property represented by the
value expression.

If validation was unsuccessful, the form is rendered using the
component's internal values

In all other cases, form will render it's values depending on the
current backing bean values.

So unless you have validaiton error, your components always loads the
most current value from your backing bean. (Up to you to have up to date
values in the backing beans. Pretty easy if they are request scope)

The datatable does not store value. Each time it needs to iterate over
it's content, it does evaluate the backing bean collection.


Aneesha Govil a écrit :
> Hi,
>
> How is it determined which components need to be reloaded when a
> component is submitted or an action is executed?
>
> I cannot get my JSF page to reload a datatable that uses component
> binding on page submit. Does using sub-views affect any behaviour,
> i.e., only the subview is refreshed, the other components retain old
> values?
>
> Please help!
> Thanks,
> Aneesha


Re: JSF Lifecycle question

Posted by Aneesha Govil <po...@gmail.com>.
Thanks a lot. That was useful.

Regards,
Aneesha

On 11/14/06, Martin Marinschek <ma...@gmail.com> wrote:
>
> *correction: only the _s_etter will be called.
>
> And as David has mentioned - this is not true for value-binding, only
> for component-binding (which I figured you were talking about).
>
> regards,
>
> Martin
>
> On 11/14/06, Martin Marinschek <ma...@gmail.com> wrote:
> > Hi Aneesha,
> >
> > component-binding never calls its getter as long as you stay on the
> > same page - only the getter will be called. So if you're doing dynamic
> > stuff in your application, you'll need to do it in the setter (or in
> > an action-method).
> >
> > regards,
> >
> > Martin
> >
> > On 11/14/06, Aneesha Govil <po...@gmail.com> wrote:
> > > Hi,
> > >
> > > How is it determined which components need to be reloaded when a
> component
> > > is submitted or an action is executed?
> > >
> > > I cannot get my JSF page to reload a datatable that uses component
> binding
> > > on page submit. Does using sub-views affect any behaviour, i.e., only
> the
> > > subview is refreshed, the other components retain old values?
> > >
> > > Please help!
> > > Thanks,
> > > Aneesha
> > >
> >
> >
> > --
> >
> > http://www.irian.at
> >
> > Your JSF powerhouse -
> > JSF Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
>
>
> --
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>

Re: JSF Lifecycle question

Posted by Martin Marinschek <ma...@gmail.com>.
*correction: only the _s_etter will be called.

And as David has mentioned - this is not true for value-binding, only
for component-binding (which I figured you were talking about).

regards,

Martin

On 11/14/06, Martin Marinschek <ma...@gmail.com> wrote:
> Hi Aneesha,
>
> component-binding never calls its getter as long as you stay on the
> same page - only the getter will be called. So if you're doing dynamic
> stuff in your application, you'll need to do it in the setter (or in
> an action-method).
>
> regards,
>
> Martin
>
> On 11/14/06, Aneesha Govil <po...@gmail.com> wrote:
> > Hi,
> >
> > How is it determined which components need to be reloaded when a component
> > is submitted or an action is executed?
> >
> > I cannot get my JSF page to reload a datatable that uses component binding
> > on page submit. Does using sub-views affect any behaviour, i.e., only the
> > subview is refreshed, the other components retain old values?
> >
> > Please help!
> > Thanks,
> > Aneesha
> >
>
>
> --
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>


-- 

http://www.irian.at

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

Professional Support for Apache MyFaces

Re: JSF Lifecycle question

Posted by Martin Marinschek <ma...@gmail.com>.
Hi Aneesha,

component-binding never calls its getter as long as you stay on the
same page - only the getter will be called. So if you're doing dynamic
stuff in your application, you'll need to do it in the setter (or in
an action-method).

regards,

Martin

On 11/14/06, Aneesha Govil <po...@gmail.com> wrote:
> Hi,
>
> How is it determined which components need to be reloaded when a component
> is submitted or an action is executed?
>
> I cannot get my JSF page to reload a datatable that uses component binding
> on page submit. Does using sub-views affect any behaviour, i.e., only the
> subview is refreshed, the other components retain old values?
>
> Please help!
> Thanks,
> Aneesha
>


-- 

http://www.irian.at

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

Professional Support for Apache MyFaces