You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Christian Helmbold <ch...@yahoo.de> on 2009/03/27 17:56:22 UTC
Formatting TabbedPanel with CSS
Hello,
I have a page with a TabbedPanel and want to use my own css class names for formatting.
I tried to use a SimpleAttributeModifier to change the class attribute of the rendered html tag, but with no effect. Then I tried to use the following code:
tabbedPanel.add(new AttributeModifier("class", new Model("tabbed_panel")));
But the rendered html looks in both cases like this:
<divwicket:id="tabs-container" class="tab-row">
("tab-row" should be "tabbed_panel").
Why does it not work?
And it is possible to change the css-classes of the tabs? I'd like to have once css-class for the selected tab and a second one for not selected tabs.
Thanks in advance!
Christian
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
AW: Formatting TabbedPanel with CSS
Posted by Christian Helmbold <ch...@yahoo.de>.
As I found out that setting the css-class works, but at the wrong place. The css-class attribute is added to the surrounding container and not to the tabbed panel.
The following html code will be replaced by the tabbed panel:
<div wicket:id="tabbedPanel">Reiter</div>
And this is the rendered result:
<div wicket:id="tabbedPanel" class="tabbed_panel">
<wicket:panel>
<div wicket:id="tabs-container" class="tab-row">
Wicket constructs another container within my "tabbedPanel" container. Thats why my css doesn't take effect.
Is there a way to alter the css-class of the inner container?
Another thing: it is possible to disable the link of the current tab, without a custom TabbedPanel class?
Thanks.
Christian
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org