Closed de-graeuler closed 1 week ago
I dug into the history of Tab rendering a little bit, and I think i found the cause for the issue: Since ccabe133a603fe15104d17d2f7155033e2f0301a, integrated as a bugfix for issue #1054, the offset value is not incremented within the runnable.
TabViewRenderer
private static void encodeTabContentPanes(FacesContext, ResponseWriter, TabView, int, List<UIComponent>)
[...]
Runnable r = new Runnable() {
public void run() {
try {
encodeTabPane(context, writer, tab,
(currentIndex+currentOffset == currentlyActiveIndex) && (!tabView.isDisabled()));
} catch (IOException ex) {
// exotic case, suffice it to log it
LOGGER.log(Level.SEVERE, "An exception occurred while rendering a tab.", ex);
}
}
};
So if the view's first tab is a TabRepeat instance, all contained tabs are rendered with the same isActive state.
I'm afraid development of BootsFaces has slowed down considerably. We'll never manage to address this issue. Let's close it.
Starting with version 1.4.2, tabview initially shows the content of all tabs, if all tabs are created dynamically. This is caused the "active" style being set for all of them: I discovered this in 1.5.0. Using 1.4.1 it works. The issue reproducible with these files:
As soon as the static tab is not commented, the tab view works as expected.
Tab and tabView are just very simple pojos, where TabViewBean builds a tabs List adding TabBeans constructed with title and string parameter.
TabViewBean:
TabBean: