Get selected tab info from MultiViewState
- undermensch
- Posts: 140
- Joined: 08 Jul 2010, 14:37
- Location: Florida, United States
I have pages with dynamic tabs that load data from the backend on a tab change event...If I use MultiViewState in a tabview, how can I get the selected tab info from the MultiViewState so that I can load the data for the retained selection?
PrimeFaces-11.0.6 / Wildfly 24
- undermensch
- Posts: 140
- Joined: 08 Jul 2010, 14:37
- Location: Florida, United States
Solved. I should have spent more time reading through the docs: https://primefaces.github.io/primefaces ... re/javaAPI
I just added the following line to my @PostConstruct method to get the info I needed:
I just added the following line to my @PostConstruct method to get the info I needed:
Code: Select all
TabViewState tabViewState = PrimeFaces.current().multiViewState().get(FacesContext.getCurrentInstance().getViewRoot().getViewId(),"centerForm:tabs",false,TabViewState::new);
PrimeFaces-11.0.6 / Wildfly 24
-
- Information
-
Who is online
Users browsing this forum: No registered users and 30 guests