You need to add the dropdown to the <li> element.
In the blog article you mentioned in your first email this is: <li
class="dropdown" wicket:id="itemContainer">
The blog uses:
<li class="dropdown" wicket:id="itemContainer">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<span wicket:id="label"/>
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li wicket:id="itemLinks"></li>
</ul>
</li>
You need to remove <b> and use <img> instead of <span>.
In the Java code replace:
itemContainer.add(new Label("label", currentMenuItem.getLabel()));
with
itemContainer.add(new ContextImage("img", ...));
Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov
On Thu, Sep 29, 2016 at 12:00 PM, ASHU_JAVA <[email protected]> wrote:
> Hi Martin,
>
> Thanks for your response.
> Please find below the JSFiddle URL of what I want to achieve in Java
> Wickets.
> JSFiddle Example <https://jsfiddle.net/ashu_mdu/xeg58nyo/>
>
> Kindly suggest solution to achieve this requirement.
> Thanks in advance.
>
> --
> View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/java-wickets-menu-on-image-button-tp4675602p4675607.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>