[
https://issues.jboss.org/browse/RF-12789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12754901#comment-12754901
]
Lukáš Fryč commented on RF-12789:
---------------------------------
Hey Lutz, I tried to reproduce your sample in my environment and got working
sample:
https://github.com/richfaces/qa/pull/8/files
----
The only thing which doesn't work is adding new tab to empty TabPanel - that is
caused by the fact that no Tab is present in the moment on the page, and thus
its resources are not loaded - this issue can be fixed either by using Resource
Optimizations feature (and loading all RichFaces resources at once) or adding
hidden Tab with to the page:
{code}
<rich:tab id="tab1" name="tab1" header="tab1 header" rendered="false">
content of tab 1
</rich:tab>
{code}
> TabPanel error after partial update with new tab
> ------------------------------------------------
>
> Key: RF-12789
> URL: https://issues.jboss.org/browse/RF-12789
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-panels-layout-themes
> Affects Versions: 4.3.0.CR2
> Environment: Mojarra 2.1.17, Tomcat 7.0.22, Java 1.7, Windows 7
> Reporter: Lutz Ulrich
> Assignee: Lukáš Fryč
> Labels: Tab, TabPanel, dynamical-add
> Fix For: 4.3.1
>
> Attachments: dynamicTab.xhtml, DynamicTabBean.java
>
> Original Estimate: 2 hours
> Remaining Estimate: 2 hours
>
> Adding tabs dynamically (programatically) in partial requests results in
> errors.
> The JavaScript code for all TabPanels and their child Tabs is added to HTML
> <body> using JavaScriptService.addScript(FacesContext, S), see
> DivPanelRenderer.writeJavaScript(), TabRenderer.doEncodeItemEnd() and
> TabRenderer.doEncodeEnd().
> The top-level <script> element in <body> won't be updated if a new Tab is
> added dynamically in a partial request. Thus, the script, new
> RichFaces.ui.Tab(...), for the new Tab is missing.
> Similar problems arise if a TabPanel is added in a partial request.
> All scripts, RichFaces.ui.Tab(...) and RichFaces.ui.TabPanel(...) should be
> rendered inline for partial update to work with new TabPanels and new Tabs.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues