Actually CSS solution is more maintainable because
1) your label is created once for ex. as <span class="image-add"></span>
2) later on you can change size, image, border etc. without updating your
label
3) your label in this case can be on any level of your application i.e.
same label can be used on /home, /home/my/, /home/my/test ...... it will
work since all image paths are relative to CSS
4) you can re-use same CSS class anywhere in your code
5) both CSS and images will be better cached
6) images can be inlined this will give you performance increase by
reducing the number of requests
7) you can provide CSS specializations to change the look of your
".image-add" based on parent element without any changes to labels :)

same time "the encrytped path is not guarantee the slashes generated" this
means you have to specify absolute path to your images or handle the depth
by your-self :(

In my applications I prefer to use CSS ....


On Fri, Oct 27, 2017 at 8:25 AM, kyc <brend...@hku.hk> wrote:

> In real case, the htmlWithImgTag is shared to use in both pages (locating
> in
> properties files).  Moreover, the encrytped path is not guarantee the
> slashes generated.
>
> If I have hundreds of this kind of code to upgrade, it is difficult to
> convert all to css (not guarantee it works) and the code is not
> maintainable.
>
> --
> Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-
> f1842947.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
WBR
Maxim aka solomax

Reply via email to