Reputation: 1162
I am using tabPanels whith "onheaderclick" attribute as follows
<rich:tabPanel id="integrationCenterTabPanel" activeItem="#{integrationCentralOverviewAction.activeTab}" switchType="ajax">
<a4j:jsFunction name="clearSelections"
action="#{integrationCentralOverviewAction.clearSelections}"
/>
<rich:tab id="invoiceTab" header="#{messages.invoices}"
immediate="true" name="invoiceTab" onheaderclick="clearSelections();">
*************
*************
</rich:tab>
<rich:tab id="customerTab" header="#{messages.customers}"
immediate="true" name="customerTab" onheaderclick="clearSelections();">
***************
**************
</rich:tab>
and I cannot switch between my tabs by clicking on the headers, it is working fine when I remove onheaderclick attribute. What am I doing wrong here!
Upvotes: 1
Views: 1105
Reputation: 1647
You actually try to do two Ajax-Requests simultaniously:
Because ajax is handled asynchroniously, this will be the reason.
You can either try to change the rich:tabs switchType to switchType="client"or
switchType="server"` (Ajax will be gone) or add the selectionClearing as a changeListener to the rich:tabPanel. This may look something like e.g. (untested):
<rich:tabPanel ...
itemChangeListener="#{integrationCentralOverviewAction.clearSelections}"/>
Hope it helps...
Upvotes: 1