[
https://issues.jboss.org/browse/RF-10989?page=com.atlassian.jira.plugin.s...
]
Jean ANDRE commented on RF-10989:
---------------------------------
There is some strange behavior with this method. There is also a NPE when you had tab even
if you set the activeItem attribute (bind to :
activeItem="#{desktopTabController.activeTab}"). It is a veritable nightmare !
The behavior of the tab seems to be different when you enclose or not tab inside an
outputPanel.
When we remove the outputPanel, there no NPE but the tab does not refresh well when we
close a tab. In both case, we are in trouble !
{code}
<h:form id="tabbedForm">
<rich:tabPanel id="desktopTabPanel" switchType="ajax"
headerPosition="top" headerLocation="center"
activeItem="#{desktopTabController.activeTab}">
<rich:tab id="tab-workitems" name="tab-workitems"
header="#{msg['desktop.tab.workitems']}">
<!-- -->
<!-- WORKITEMS TAB -->
<!-- -->
</rich:tab>
<c:forEach items="#{desktopTabController.desktopTabBean.tabElements}"
var="tab">
<a4j:outputPanel>
<rich:tab id="#{tab.id}" name="#{tab.id}" >
<!-- -->
<!-- DYNAMIC TABS -->
<!-- -->
<f:facet name="header">
<h:panelGrid columns="2">
<h:outputText value="#{tab.id}" />
<h:graphicImage value="/images/closeButton.png"
styleClass="closeButton"
onclick="closeTab('#{tab.id}');" />
</h:panelGrid>
</f:facet>
<ui:fragment rendered="#{tab.isTabClient}">
<!-- -->
<!-- CLIENT TAB -->
<!-- -->
<ui:include src="client/listClient.xhtml" />
</ui:fragment>
<ui:fragment rendered="#{tab.isTabWorkItems}">
<!-- -->
<!-- WORKITEMS TAB -->
<!-- -->
<ui:include src="workItems/listWorkItems.xhtml" />
</ui:fragment>
</rich:tab>
</a4j:outputPanel>
</c:forEach>
</rich:tabPanel>
{code}
Reimplement AbstractPanel.getActiveItem() more defensively
----------------------------------------------------------
Key: RF-10989
URL:
https://issues.jboss.org/browse/RF-10989
Project: RichFaces
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: component-panels-layout-themes, optimization
Affects Versions: 4.0.0.Final
Reporter: Lukáš Fryč
Assignee: Lukáš Fryč
Priority: Trivial
Fix For: 4.2.0.Tracking
Based on the discussions in RF-10951, it will be good to implement
AbstractPanel.getActiveItem(), because it will fail each time you remove the active tab.
--
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