Great! I will take a look at that. Thanks!

It seems to be hardcoded the tabbedPanel class attribute :(

Looking at the code tabbedPanel constructor,

            protected LoopItem newItem(int iteration)
            {
                return new LoopItem(iteration)
                {
                    private static final long serialVersionUID = 1L;

                    protected void onComponentTag(ComponentTag tag)
                    {
                        super.onComponentTag(tag);
                        String cssClass = (String)tag.getString("class");
                        if (cssClass == null)
                        {
                            cssClass = " ";
                        }
                        cssClass += " tab" + getIteration();

                        if (getIteration() == getSelectedTab())
                        {
                            cssClass += " selected";
                        }
                        if (getIteration() == getIterations() - 1)
                        {
                            cssClass += " last";
                        }
                        tag.put("class", cssClass.trim());
                    }

                };

On Jan 3, 2008 8:05 PM, Martijn Dashorst <[EMAIL PROTECTED]> wrote:

> Take a look at AttributeAppender, AttributeModifier or
> SImpleAttributeModifier. You can add them to a component and they
> allow you to modify tag attributes.
>
> Martijn
>
> On Jan 3, 2008 10:45 PM, Fernando Wermus <[EMAIL PROTECTED]>
> wrote:
> > I am trying to use the themes from Drupal in a wicket app. I need then
> to
> > override the class tag attributes for the ones named in the themes. But
> I
> > don't know how to do it, for instance in tabpanel tags such as li and
> ul. I
> > imagine is pretty easy.
> >
> >
> > for instance,
> >
> > li class="tab0 selected"
> >
> > to
> >
> > li class="menu-1-2-2"
> >
> > Thanks in advance.
> >
> >
> >
> >
> > --
> > Fernando Wermus.
> >
>
>
>
> --
> Buy Wicket in Action: http://manning.com/dashorst
> Apache Wicket 1.3.0 is released
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Fernando Wermus.

Reply via email to