java - Wicket wrap img element in a link -
i have wicket code shows image:
<div class="someclass"> <img wicket:id="some-image"/> </div>
this works great.
i have requirement sais, image might wrapped in link , link needs generated wicket side.
so implement nicest way possible without having add both sections this:
<a wicket:id="link-for-image"> <div class="someclass"> <img wicket:id="some-image-with-link"/> </div> </a> <div class="someclass"> <img wicket:id="some-image"/> </div>
and hiding 1 or other.
what standard way of implementing nicely?
is there way define kind of generic type "link-for-image" can maybe create web markup container instead of link?
thanks!!!
- use either
border
- use fragments
- output
<a>
always, hidehref
attribute.
ps: <div>
not allowed inside <a>
due html standard.
Comments
Post a Comment