You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Maxim Solodovnik <so...@gmail.com> on 2016/03/13 09:38:49 UTC

OrderByBorder getCssClass as separate method

Hello All,

In wicket 6.x cssClass provided by CssProvider to OrderByBorder was applied
to both container and link
<span><a></a></span>
in my case

in wicket 7 css class is being applied only to container
I would like add cssClass to the link

to implement this I'll override newOrderByLink and will add the class

I believe it might be good idea to extract code to get cssClass name to
separate method to reduce code duplication

WDYT?

-- 
WBR
Maxim aka solomax

Re: OrderByBorder getCssClass as separate method

Posted by Maxim Solodovnik <so...@gmail.com>.
Hello Martin,

previously I tried to implement this via css but failed ...
now while replying to you I found the solution :))))

I'll use CSS solution :)
Thanks!

On Sun, Mar 13, 2016 at 2:59 PM, Martin Grigorov <mg...@apache.org>
wrote:

> Hi Maxim,
>
>
> On Sun, Mar 13, 2016 at 9:38 AM, Maxim Solodovnik <so...@gmail.com>
> wrote:
>
> > Hello All,
> >
> > In wicket 6.x cssClass provided by CssProvider to OrderByBorder was
> applied
> > to both container and link
> > <span><a></a></span>
> > in my case
> >
> > in wicket 7 css class is being applied only to container
> > I would like add cssClass to the link
> >
>
> Why do you need to do this ?
> I think it is simpler to have a more specific CSS rule for the link:
>
> span.mySpecialCssClass {
>   /* my rules for the span */
> }
>
> span.mySpecialCssClass a {
>   /* my rules for the link */
> }
>
> Doesn't that cover the needs ?
>
>
> > to implement this I'll override newOrderByLink and will add the class
> >
> > I believe it might be good idea to extract code to get cssClass name to
> > separate method to reduce code duplication
> >
> > WDYT?
> >
> > --
> > WBR
> > Maxim aka solomax
> >
>



-- 
WBR
Maxim aka solomax

Re: OrderByBorder getCssClass as separate method

Posted by Martin Grigorov <mg...@apache.org>.
Hi Maxim,


On Sun, Mar 13, 2016 at 9:38 AM, Maxim Solodovnik <so...@gmail.com>
wrote:

> Hello All,
>
> In wicket 6.x cssClass provided by CssProvider to OrderByBorder was applied
> to both container and link
> <span><a></a></span>
> in my case
>
> in wicket 7 css class is being applied only to container
> I would like add cssClass to the link
>

Why do you need to do this ?
I think it is simpler to have a more specific CSS rule for the link:

span.mySpecialCssClass {
  /* my rules for the span */
}

span.mySpecialCssClass a {
  /* my rules for the link */
}

Doesn't that cover the needs ?


> to implement this I'll override newOrderByLink and will add the class
>
> I believe it might be good idea to extract code to get cssClass name to
> separate method to reduce code duplication
>
> WDYT?
>
> --
> WBR
> Maxim aka solomax
>