[ https://issues.jboss.org/browse/RF-11506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12642827#comment-12642827 ]
Lukáš Fryč commented on RF-11506: --------------------------------- In the last provided sample, you render {{tab5}}, thus markup of {{tab5}} and {{tab6}} are replaced incorrectly. This behavior has workaround: * do not render *inactive* tab Try correct sample: * when {{tab5}} rendered when active, tabPanel stays to work fine. However when using togglePanel like tabPanel in ajax mode, the correct solution is render whole tabPanel conditionally when given tab active. {code} render="#{activeTab=='tab5' ? 'tab5' : ''}" {code} It is possible to sanitize the behavior of tabPanel for your case, but it's really not worth of it. If you disagree, please provide real-world use-case for rendering inactive tab in ajax mode. > Tab panel: not possible to switch panels after ajax request > ----------------------------------------------------------- > > Key: RF-11506 > URL: https://issues.jboss.org/browse/RF-11506 > Project: RichFaces > Issue Type: Bug > Security Level: Public(Everyone can see) > Components: base functionality , component-output > Affects Versions: 4.1.0.Milestone3 > Environment: RichFaces 4.1.0.20111011-M3 > Metamer 4.1.0-SNAPSHOT > Mojarra 2.1.3-SNAPSHOT > JBoss Web 7.0.2.Final > OpenJDK Runtime Environment 1.6.0_22-b22 @ Linux > Chrome 14.0.835.202 @ Linux i686 > Reporter: Pavol Pitonak > Assignee: Lukáš Fryč > Priority: Critical > Fix For: 4.1.0.Final > > > {code:xml} > <a4j:commandButton id="doNothingButton" value="do nothing" render="tab2" /> > <rich:tabPanel id="tabPanel" > > <rich:tab id="tab1" name="tab1" header="tab1 header"> > content of tab 1 > </rich:tab> > <rich:tab id="tab2" name="tab2" header="tab2 header"> > content of tab 2 > </rich:tab> > <rich:tab id="tab3" name="tab3" header="tab3 header"> > content of tab 3 > </rich:tab> > <rich:tab id="tab4" name="tab4" header="tab4 header" disabled="true"> > content of tab 4 > </rich:tab> > <rich:tab id="tab5" name="tab5" header="tab5 header"> > content of tab 5 > </rich:tab> > </rich:tabPanel> > {code} > # switch to tab 2, 3, 5, 1 > # click the button > # switch to tab 2 > result: > panel is not switched > Sometimes the following error appears in Chrome console: > {code} > Uncaught TypeError: Cannot read property 'disabled' of undefined > togglePanel.js:78 > B.ui.TogglePanel.B.BaseComponent.extendClass.__getItemIndex > togglePanel.js:78 > B.ui.TogglePanel.B.BaseComponent.extendClass.__getItemByName > togglePanel.js:87 > B.ui.TogglePanel.B.BaseComponent.extendClass.getNextItem > togglePanel.js:46 > B.ui.TogglePanel.B.BaseComponent.extendClass.switchToItem > togglePanel.js:36 > A.ui.Tab.A.ui.TogglePanelItem.extendClass.__onHeaderClick tab.js:7 > getHandlerWrapper js:38 > jQuery.event.handle js:2965 > jQuery.event.add.elemData.handle.eventHandle js:2599 > {code} -- 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