How to switch p:tab in the same form using a command button

Bryn picture Bryn · Apr 18, 2011 · Viewed 9.6k times · Source

How do I switch to a tab (<p:tab>) using a command button?

Answer

Cagatay Civici picture Cagatay Civici · Apr 18, 2011

There is also a client side api method called selectTab(index);

<p:commandButton type="button" onclick="widgetvar.selectTab(2)" value="Show" />