[ https://issues.apache.org/jira/browse/MYFACES-3168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13132926#comment-13132926 ]
Leonardo Uribe commented on MYFACES-3168: ----------------------------------------- Hi Richard I checked the comment on metawidget forum and it seems like a typo error. The datatable definition is: <h:dataTable id="communications" value="#{contact.currentCommunications}" var="_communication" but the metawidget usage is this: <m:metawidget value="#{communication.current.value}" rendererType="simple" rendered="#{!contact.readOnly}"/> It should be <m:metawidget value="#{_communication.current.value}" rendererType="simple" rendered="#{!contact.readOnly}"/> Now about this bug: I think we have done everything we can. I have discussed earlier this problem with other people. The last thing done was on MYFACES-3289. Here are some comments discussed earlier: ?? >> Also your workarounds of finding the components by executing findComponent ?? >> are not really safe: findComponent does not setup the context of the component ?? >> which you would need to have. Only invokeOnComponent or a treevisit can do ?? >> this for you! LU >> Yes, I know, but note both invokeOnComponent and visitTree requires a clientId. LU >> The problem is for example when the component is inside a datatable. There is LU >> only one real UIComponent instance, but it could be many "virtual" instances LU >> per row. Since PreRenderViewEvent is propagated to UIViewRoot, there is no LU >> associate context, so the only way to do it is create a findComponent expression LU >> to locate the real component instance. LU >> I know in this case a invokeOnComponent or visitTree with a "findComponent LU >> expression" sounds better, but there is nothing on the spec that helps. Usually LU >> the tasks done in that location does not require the context, so it is valid to LU >> simplify this case and expect only one call per real component. In conclusion, LU >> I agree with the solution done in mojarra for this one, even if it is not the LU >> best we can do in this case. LU >> Anyway, there is something missing on the spec. Some weeks ago, I sent a mail LU >> to the EG list under the name: LU >> [jsr344-experts] Referencing composite component attributes in child components LU >> outside of a tree traversal LU >> I think at the end there is something related to this one. It would be great to have a way to call a visitTree or invokeOnComponent using a "find component expression". In that way, from PreRenderViewEvent the developer can set up the context using such call. For now all that should be done outside the spec. > Bound attribute values resolve to NULL during PreRenderViewEvent for nested > composite components > ------------------------------------------------------------------------------------------------ > > Key: MYFACES-3168 > URL: https://issues.apache.org/jira/browse/MYFACES-3168 > Project: MyFaces Core > Issue Type: Bug > Components: General > Affects Versions: 2.0.6, 2.1.0 > Environment: Windows 7 x64 Enterprise. > JDK 1.6.0_25. > Eclipse Version: Helios Service Release 2 > Build id: 20110218-0911 > Reporter: MAtthew Sweeney > Assignee: Leonardo Uribe > Attachments: jsf-testing-2.zip, jsf-testing-myfaces.zip, > screenshot-1.jpg > > > When nesting custom composite components, any data bound attributes (eg > #{someValueExpression} ) will resolve to null during the PreRenderViewEvent. > This only occurs on the second level or deeper nested component (the > top-level component in the page works fine). > This same issue occurs on JSF RI 2.0.4, 2.1.x, 2.2.x > I have an eclipse project for upload that reproduces the problem. > I have no cause for the issue at this time. > Cheers, > Matt -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira