How to start in a certain tabindex (primefaces) tab?

0

How do I display one on a given tab? I tried to use tabIndex="#{meuBean.tabIndex}" setting to 0,1,2 and etc, but when opening it it always positions itself on the first tab.

    
asked by anonymous 05.10.2015 / 19:42

1 answer

1

Use:

PF('suaTabView').select(1);

Ex:

<p:commandButton onclick="PF('tabViewEdit').select(0);" />

Or you can enable the tab through an attribute in the Managed Bean

<p:tabView activeIndex="${meuMB.tabAtiva}" >  
    
05.10.2015 / 21:11