>On 2/6/06, Ryan Wynn <[EMAIL PROTECTED]> wrote: >> >> It seems the binding attribute is not getting set until the restore >> view phase. For example if I have >> >> <component> >> <attributes> >> <set name="binding" value="#{foo.bar}" bindingType="VB"/> >> ... >> >> setBar is not called until the view is restored. I would have thought >> that I would have access to the component during the initial render >> phase. >> >> What I would like to do is during render have getBar() return me a >> reference to the UIComponent, but of course it returns null. >> >> Is this a bug or a misunderstanding on my part? > > >The "binding" attribute is evaluated and reattached in the Restore View >phase of the request processing lifecycle, and I know this works correctly >for components in JSP pages (Creator 2 sets up bindings for *all* >components). Maybe there needs to be is something interesting going on >inside Clay for this attribute? >
I agree. I took a peek at the myfaces UIComponentTag and in the "createComponentInstance" method there is a check for the existence of a "binding" attribute. If there is one, the component instance pulled from the target managed bean. Otherwise, it's using the createComponent factory method on the application. The Clay component is not respecting the "binding" attribute when creating the component subtree. It should use the binding attribute to create the component and ignore it when setting the property values of the component. Does this sound correct? > >>Thanks, >> Ryan >> > > >Craig Gary