-
1. Re: Re-ordering tabs
ilya_shaikovsky Dec 18, 2008 4:16 AM (in response to wind1heart)the questions seems the same as how to swap two objects in a collection ;)
-
2. Re: Re-ordering tabs
wind1heart Dec 18, 2008 5:26 AM (in response to wind1heart)I found the newly created tab places at the end of the list. However, it will always appear as the first tab. Indeed, I want it be the last one. Any solution?
-
3. Re: Re-ordering tabs
ilya_shaikovsky Dec 18, 2008 5:32 AM (in response to wind1heart)show you code snippets for the case please.
-
4. Re: Re-ordering tabs
wind1heart Dec 18, 2008 8:20 PM (in response to wind1heart)Originally, there are tabs "OuterTabA" and "OuterTabB". When user click on a checkbox, method addTabs will be entered.
public void addTabs(ValueChangeEvent event) {
FacesContext context = FacesContext.getCurrentInstance();
Application application = context.getApplication();
HtmlTab newTab = (HtmlTab) application.createComponent(HtmlTab.COMPONENT_TYPE);
newTab.setId("OuterTabC");
newTab.setLabel("OuterTabC");
tabPanel.getChildren().add(newTab);
}
The result is, I can see the tabs in this order "OuterTabC", "OuterTabA", "OuterTabB". However, I want the new tab place at the end.