Hi there
I am trying to have a tab view to represent an object (so that I group related information in appropriate tabs). Where I have the problem is in navigating from one tab to another as a response to form submit (or any eve.
But as I cannot bind a tabItem tag to a TabItem object I am not sure how to get a handle to the tabitems in the controller bean.
Is there any code sample for that or any idea?
Many thanks in advance
shai
Shai,
I think you only need a hold on the TabView object and then use the API to get the tabs in the backing bean (TabView.getTabs()). This way you can iterate through all the tabs using a single TabView binding, selected/deselect, enable/disable.
Taz.
Thanks Taz..
Think I will need the more complex one though...
I would like to show a tab view with about 5 tabitems representing related details. Users should be taken from one tab to another by pressing Next or Back (like a wizard). In order to implement cross tab navigation, I will need control on all of the tabs somwhere central.
So if that central place for me is a backing bean with a TabView object, to which I will attach the TabItems as needed- Will i still need to bind each tabItem or would binding the TabView be sufficient
<ig:tabView>
<ig:tabItem binding="#{myBean.myTabItem}"></ig:tabItem>
<ig:tabItem binding="#{myBean.myTabItem2}"></ig:tabItem>
<ig:tabItem binding="#{myBean.myTabItem3}"></ig:tabItem>
</ig:tabView>
Or
<ig:tabView binding="#{myBean.myTabView">
Thanks again
Hello Shai,
You can bind TabView and TabItem via backing beans for more simple solution in your case. An example of binding a TabItem tag to a TabItem object would be:
private com.infragistics.faces.tab.component.TabItem _myTabItem;
{
}
_myTabItem = myTabItem;
In your case you might be able to use the TabItemListener and use the TabView object's model to get the tab items and enable/disable tabs accordingly.
Hope this helps.
-Taz.
One option that works for me is with boolean parameters in the tabItem tags like:
<ig:tabItem value="Basic Details" id="basic_details_TabItem" selected="#{myBean.detailsSelected}" disabled="#{myBean.detailsDisabled}">
but as there are about 5 steps I am interested to see a more elegant solution than setting 10 booleans in every listener method.
Shai