[ https://issues.jboss.org/browse/RF-11506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12642906#comment-12642906 ]
Lukáš Fryč commented on RF-11506: --------------------------------- From Developer's Guide: {quote} 3.5. Restrictions As with most Ajax frameworks, you should not attempt to append or delete elements on a page using RichFaces Ajax, but should instead replace them. As such, elements that are rendered conditionally should not be targeted in the render attributes for Ajax controls. For successful updates, an element with the same identifier as in the response must exist on the page. If it is necessary to append code to a page, include a placeholder for it (an empty element). {quote} It applies also on this sample since it is rendering tab which is rendered conditionally (when active). > 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