Change Active Tab of TabView

UI Components for JSF
Post Reply
robert.m
Posts: 226
Joined: 07 Dec 2010, 22:52
Location: Salzburg/Austria

09 Dec 2010, 17:01

Is there a way to change the active tab of a TabView using a Button (p:commandButton or h:commandButton) from outside the TabView? What I'm trying to implement is a panel in the top-right corner with some Buttons to control a few elements of the page. And one of them would be to change the TabView to a specific tab.

I tried using a p:commandButton which set an integer value in a backing bean to a specific value. the button contained the id of the tabview in it's "update" property. The TabView hat the activeIndex-attribute set to "#{backingBean.index}. But this didn't work out.

Is there any other way to accomplish that?

User avatar
kwintesencja
Posts: 316
Joined: 08 Feb 2010, 20:33
Location: Brazil

09 Dec 2010, 17:14

Hello,

Whats the scope of your mbean? can you post a sample code so i can test here? cause it should work the way you're doing.
Att,

--

Rafael Mauricio Pestano


Primefaces 5.x + JavaEE7(Glassfish 4.x and Wildfly 8)
Conventions Framework
Blog
@realpestano

robert.m
Posts: 226
Joined: 07 Dec 2010, 22:52
Location: Salzburg/Austria

09 Dec 2010, 19:29

strange... i just tried it once more and it worked... i even used the same code i used yesterday. well then thanks for the advice :)

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 58 guests