[richfaces-issues] [JBoss JIRA] (RF-11054) Dynamically created tabs within tabPanel causes NPE in getActiveItem()

Jean ANDRE (Commented) (JIRA) jira-events at lists.jboss.org
Fri Nov 18 14:44:40 EST 2011


    [ https://issues.jboss.org/browse/RF-11054?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644058#comment-12644058 ] 

Jean ANDRE commented on RF-11054:
---------------------------------

This code does not trigger the NPE - This is the close button on the tab. But the tab must be selected for working.

<rich:tab id="#{tab.id}" name="#{tab.id}" actionListener="#{desktopTabController.tabListener}">
<f:facet name="header">
   <h:panelGrid columns="2">
   <h:outputText value="#{tab.id}" />
   <h:commandButton image="/images/closeButton.png"
               styleClass="closeButton"
                  action="#{desktopTabController.closeTab(tab.id)}" />
  </h:panelGrid>


This code triggers the NPE - This code follow the sample of : http://livedemo.exadel.com/richfaces-demo/richfaces/tabPanel.jsf?tab=delete&cid=420041

<h:graphicImage value="/images/closeButton.png"
	   styleClass="closeButton"
	      onclick="closeTab('#{tab.id}');Event.stop(event);"
	    immediate="true" />

<a4j:jsFunction id="closeTab" name="closeTab" action="#{desktopTabController.closeTab}" render="desktopTabPanel">
<a4j:param name="tabId" assignTo="#{desktopTabController.closeTabId}" />
</a4j:jsFunction>



                
> Dynamically created tabs within tabPanel causes NPE in getActiveItem()
> ----------------------------------------------------------------------
>
>                 Key: RF-11054
>                 URL: https://issues.jboss.org/browse/RF-11054
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: base functionality , component-panels-layout-themes
>    Affects Versions: 4.0.0.Final
>         Environment: RichFaces 4.1.0-SNAPSHOT r.22526
> Metamer r.22526
> Mojarra 2.0.4-b09
> Apache Tomcat 7.0.12
> Java(TM) SE Runtime Environment 1.6.0_19-b04 @ Linux
> Chrome 12.0.718.0 @ Linux i686
>            Reporter: Ján Jamrich
>             Fix For: 4.Future
>
>         Attachments: exception-on-tab-switch
>
>
> When set switchType on TabPanel to "server" (notice that with "client" everything works correctly, with "ajax" tab switch not work as well as with "null"), all dynamically created tabs causes NPE on tab switch.

--
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

       



More information about the richfaces-issues mailing list