In fact now that I think of it, you don't even need the wrapper div.
Remember that the TabbedPanel renders the tabs *inside* the tag to
which it's attached. That tag can contain the CSS class that makes that
set of tabs unique:
<div wicket:id="tabs" class="greentabs"></div>
add(new TabbedPanel("tabs", tabs));
The result is like this:
<div class="greentabs">
<div class="tab-row">
...
</div>
</div>
If you need to determine the class dynamically, just add an appropriate
behaviour to the TabbedPanel:
add(new TabbedPanel("tabs", tabs)
.add(new AttributeModifier("class", new Model("purpletabs"))));
jk
On Wed, May 16, 2007 at 06:28:57AM -0700, Alex Objelean wrote:
>
> That is the problem. How can I attach a WebMarkupContainer to a "tab-row"
> container?
> The markup is generated by TabbedPanel and I cannot manipulate it's
> markup... :(
>
>
> Hi Alex,
>
> The way I've tackled this is to have a wrapper div around the entire tab
> panel, like so...
>
> <div class="mytabs">
> <div class="tab-row">
> <ul>
> ...
> </ul>
> </div>
> </div>
>
> You just need to add the wrapper div to your CSS selector:
>
> div.mytabs li {
> background-color: green;
> }
>
> Then you can have different wrapper divs for different styling:
>
> div.othertabs li {
> background-color: purple;
> }
>
> If you need to dynamically manipulate the wrapper div, simply attach a
> WebMarkupContainer to it.
>
> HTH
>
> jk
>
> On Wed, May 16, 2007 at 04:33:37AM -0700, Alex Objelean wrote:
> >
> > Currently, the markup generated for the tabbedPanel component looks like
> > this:
> >
> > [code]
> > <wicket:panel>
> > <div class="tab-row">
> > <ul>
> > <li wicket:id="tabs">
> > # [[tab title]]
> > </li>
> > </ul>
> > </div>
> > [panel]
> > </wicket:panel>
> > [/code]
> >
> > I think that it would be more useful to add a container to the existing
> > tabs, so the resulted markup would look like this:
> >
> > [code]
> > <wicket:panel>
> > <div wicket:id="tabsContainer" class="tab-row">
> > <ul>
> > <li wicket:id="tabs">
> > # [[tab title]]
> > </li>
> > </ul>
> > </div>
> > [panel]
> > </wicket:panel>
> > [/code]
> >
> > This way you can append a new css class to this container (using
> > AttributeAppender behavior) and can control the specific visual appearance
> > of the tabbed panel... It is not enough to have only "tab-row" class,
> > because if you have nested tabbed panels (which have different styling) it
> > is hard to style them as you want... And finally, you give the developer a
> > freedom to do what he wants with this container...
> >
> > What do you think?
> >
> > Thank you!
> >
>
> --
> View this message in context:
> http://www.nabble.com/-Request-for-enhancement--TabbedPanel-tf3764064.html#a10641787
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -------------------------------------------------------------------------
> 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
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user