Yes, it is acceptable an solution... Also, I thought about somehow dynamically providing markup for the tab-row container, or having a possibility to decorate it with you own container... any thoughts?
igor.vaynberg wrote: > > i dont like adding a container that users can mock with. if you want to go > that far then just create your own tabbedpanel, its only a few lines of > code. what i can see is some overridable method to add a css class to that > tab row, will that work? > > -igor > > > On 5/16/07, Alex Objelean <[EMAIL PROTECTED]> wrote: >> >> >> Though it can be a solution, it is not a natural one... because I want to >> make the difference between outer and inner tab-row, not between outer vs >> inner tab-panel. >> >> >> John Krasnay wrote: >> > >> > Ahh, I see...the problem is *nested* tabs. Sorry for not picking that >> up >> > earlier. However, I think the same principle applies, no? Just give the >> > inner tab panel a different CSS class than the outer one. >> > >> > jk >> > >> > On Wed, May 16, 2007 at 07:39:04AM -0700, Alex Objelean wrote: >> >> >> >> This solution adds the css class the the entire tabbedPanel container, >> >> subsequently all nested tabbedPanels will be treated the same way.... >> >> What I >> >> need is to identify the "tab-row" container.... >> >> >> >> >> >> John Krasnay wrote: >> >> > >> >> > 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 >> >> >> Wicket-user@lists.sourceforge.net >> >> >> 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 >> >> > Wicket-user@lists.sourceforge.net >> >> > https://lists.sourceforge.net/lists/listinfo/wicket-user >> >> > >> >> > >> >> >> >> -- >> >> View this message in context: >> >> >> http://www.nabble.com/-Request-for-enhancement--TabbedPanel-tf3764064.html#a10642947 >> >> 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 >> >> Wicket-user@lists.sourceforge.net >> >> 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 >> > Wicket-user@lists.sourceforge.net >> > https://lists.sourceforge.net/lists/listinfo/wicket-user >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/-Request-for-enhancement--TabbedPanel-tf3764064.html#a10659401 >> 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 >> Wicket-user@lists.sourceforge.net >> 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 > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > -- View this message in context: http://www.nabble.com/-Request-for-enhancement--TabbedPanel-tf3764064.html#a10660053 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 Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user