Tab View ActiveIndex behavior

UI Components for JSF
Post Reply
burferd
Posts: 234
Joined: 01 May 2010, 16:15

03 Aug 2010, 23:53

I am still having problems figuring out how the activeIndex in the tabView actually works.

I was under the assumption that it worked like other component properties,
and that when bound to a backing bean property, changes in the backing bean would update the activeIndex for the tab,
and that when the tab index is manually changed, the backing bean property would be updated as well.
This is how all the other component properties appear to behave when attached to a backing bean property.

Now, I am running into the issue that if I change the activeIndex in my tabView, navigate to a different page, and return to the page with the tabVIew,
the activeIndex remains what to what it was last selected.
This happens even if I reset the activeIndex in the backing bean before the page is redrawn.

I use the beforePhase() method of the view to do my initial page setup before the page is redrawn.
This seems to work for everything so far except the activeIndex of the tabView.

How can I reset the activeIndex to it's default state after navigating away to a different page?

This has been a real PITA for me and is very frustrating.
I do not understand why this one component property appears to behave in such an unfirendly manner.

Is this a bug?
If not, is there some way that it might be changed in the future to behave in a more intuitive manner?

Thanks
Using PrimeFaces 3.4, Mojarra 2.1.6, Glassfish 3.1.2, NetBerans 7.2, Hibernate 3.2.5 (sometimes)
Windows 7.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

04 Aug 2010, 11:15

Hi,

This is not a bug, only editableValueHolder components update their bound values which is usually the value attribute. So most attributes of a component are readonly.

However in this case, I think you are right that activeIndex should be both read-write kind of an attribute.

Please create a feature request.

Thanks.

burferd
Posts: 234
Joined: 01 May 2010, 16:15

04 Aug 2010, 13:37

How do I create a feature request?
Using PrimeFaces 3.4, Mojarra 2.1.6, Glassfish 3.1.2, NetBerans 7.2, Hibernate 3.2.5 (sometimes)
Windows 7.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

05 Aug 2010, 12:19

You need to select Type-NewFeature tag but it will already be automatically selected when you create a new issue;

http://code.google.com/p/primefaces/issues/list

burferd
Posts: 234
Joined: 01 May 2010, 16:15

11 Aug 2010, 17:11

This has been added as item 1132.
Using PrimeFaces 3.4, Mojarra 2.1.6, Glassfish 3.1.2, NetBerans 7.2, Hibernate 3.2.5 (sometimes)
Windows 7.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

14 Aug 2010, 14:53

This enhancement is implemented now.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 27 guests