You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Phanidhar Adusumilli <ph...@gmail.com> on 2005/10/19 17:24:51 UTC

binding dynamically created components

Currently I am adding new components to the tree on an action. These new
components have binding attribute set. But when they are rendered first time
the backing bean that is associated with these new components does not get
intialized with the component references.
 For all subsequent requests they are available in the backing bean.
 After debugging, I found that in LifeCycleImpl during restore view phase
recursivelyHandleComponentReferencesAndSetValid is called. this evaluates
the binding expression for all the components in tree and thus they are
available in the backing bean associated with the components.
 If I have to make sure that the dynamically added components are available
in backing bean, I can call the static method
recursivelyHandleComponentReferencesAndSetValid on LifeCycleImpl.
 I would appreciate others thoughts on this scenario? How is it handled if
you have had the same scenario?