Skip to main content
adição de exemplo
Fonte Link
NilsonUehara
  • 3,2mil
  • 16
  • 38

Use:

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

Ex:

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

Ou pode ativar a aba através de um atributo no Managed Bean

<p:tabView activeIndex="${meuMB.tabAtiva}" >  

Use:

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

Ex:

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

Use:

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

Ex:

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

Ou pode ativar a aba através de um atributo no Managed Bean

<p:tabView activeIndex="${meuMB.tabAtiva}" >  
Fonte Link
NilsonUehara
  • 3,2mil
  • 16
  • 38

Use:

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

Ex:

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