Hi,
I'm trying to update the provided TabbedPanel to be able to provide a new
CSS style to each tab so I can control the color of each tab.
I tried subclassing TabbedPanel and adding this method:
@Override
protected void onBeforeRender() {
super.onBeforeRender();
// get each tab and add a style
for (int i = 0; i < getTabs().size(); i++) {
Component tab = get("tabs-container:tabs:" + i);
tab.add(new AttributeAppender("class", true, new Model("tab"+i),
" "));
}
}
This doesn't work (Null Pointer) because this method gets called before the
actual tabs are added. I tried using onAfterRender(). This time the tabs
exist, but I can't modify the hierarchy during rendering.
Is there a way I can accomplish what I want without forking the TabbedPanel
class?
Thanks for your help,
Erik
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user