[ https://issues.jboss.org/browse/RF-11694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12645970#comment-12645970 ]
Lukáš Fryč edited comment on RF-11694 at 11/30/11 12:55 PM: ------------------------------------------------------------ Hi Jean, I think you are facing issues with ajax loaded components and their resources. The problem is that {{rich:tab}} is traditionally loading resources (CSS/JS) for components in initial page, but due to JSF issues, they can't be loaded when these components aren't known in initial state of component tree (they are renderer dynamically). This might be the case of components under dynamic {{c:forEach}}. The workaround is to render resources to the initial page, basically you need to get following links rendered to the page: {code} <script type="text/javascript" src="/showcase/javax.faces.resource/datatable.js.jsf?ln=org.richfaces"></script> <link type="text/css" rel="stylesheet" href="/showcase/rfRes/datatable.ecss.jsf?db=eAHb1WuhCAAFJAGh&ln=org.richfaces" /> {code} These are workarounds which I propose (haven't tried, please let me know which works): * use {{<h:dataTable />}} with {{style="display:none"}} (also {{rendered="false"}} could work) * use {{<h:outputStylesheet library="org.richfaces" name="datatable.ecss">}} and {{<h:outputScript library="org.richfaces" name="datatable.js">}} (EDIT: you need to place them into {{<h:body>}} section) * use aggregated (packed) resources feature (resources for all components will be rendered by default, see [1]) [1] http://docs.jboss.org/richfaces/4.1.X/4.1.0.CR1/Developer_Guide/en-US/html/chap-Developer_Guide-Advanced_features.html#sect-Developer_Guide-Advanced_features-Resource_loading_strategies was (Author: lfryc): Hi Jean, I think you are facing issues with ajax loaded components and their resources. The problem is that {{rich:tab}} is traditionally loading resources (CSS/JS) for components in initial page, but due to JSF issues, they can't be loaded when these components aren't known in initial state of component tree (they are renderer dynamically). This might be the case of components under dynamic {{c:forEach}}. The workaround is to render resources to the initial page, basically you need to get following links rendered to the page: {code} <script type="text/javascript" src="/showcase/javax.faces.resource/datatable.js.jsf?ln=org.richfaces"></script> <link type="text/css" rel="stylesheet" href="/showcase/rfRes/datatable.ecss.jsf?db=eAHb1WuhCAAFJAGh&ln=org.richfaces" /> {code} These are workarounds which I propose (haven't tried, please let me know which works): * use {{<h:dataTable />}} with {{style="display:none"}} (also {{rendered="false"}} could work) * use {{<h:outputStylesheet library="org.richfaces" name="datatable.ecss">}} and {{<h:outputScript library="org.richfaces" name="datatable.js">}} * use aggregated (packed) resources feature (resources for all components will be rendered by default, see [1]) [1] http://docs.jboss.org/richfaces/4.1.X/4.1.0.CR1/Developer_Guide/en-US/html/chap-Developer_Guide-Advanced_features.html#sect-Developer_Guide-Advanced_features-Resource_loading_strategies > RF4 : Bad rendering on rich:dataTable inside ui:include enclosed in a > rich:tabPanel > ----------------------------------------------------------------------------------- > > Key: RF-11694 > URL: https://issues.jboss.org/browse/RF-11694 > Project: RichFaces > Issue Type: Bug > Security Level: Public(Everyone can see) > Components: component-tables > Affects Versions: 4.0.0.Final > Environment: Websphere 8 - RAD 8 - JSF Mojorra 2.1.4 - Spring 3.0.6 > Final - Use @Inject @Named @SessionScoped as annotations - Firefox 7.0.1 - > Windows 7 (6.1 sp1) > Reporter: Jean ANDRE > Fix For: 4.Future > > Attachments: After F5 Key.jpg, Newly dynamic tab.jpg, Screen at the > beginning....jpg > > > The rich:dataTable is not rendering with CSS style when the dataTable is > inside a separate file (ui:include src=....) during the ajax rendering on a > dynamic insert of rich:tab. > The error does not appear when the content of the include file is directly > moved inside the final page, I mean without ui:include. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira _______________________________________________ richfaces-issues mailing list richfaces-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/richfaces-issues