I'm using a Popover component of the GWtBootstrap - org.gwtbootstrap3.client.ui.Popover. I need to add few Clickable images that invoke java method. As popover does not let you add any widget to its content, I can use the following code to add links
final Popover popover = new Popover();
final SafeHtml html = new SafeHtmlBuilder().appendHtmlConstant("<a href='' title='test add link'>link on content</a>").toSafeHtml();
popover.setHtml(html);
then invoking the Java method using one of the solution here Calling GWT Java function from JavaScript
But whole of this looks little ugly, I also think adding links/images using raw html is very fragile and will be vulnerable.
Is there any better way to have Popover's content having GWT widgets so that we can better control them, may be extending the Popover class could be one option. Any suggestions/hints/solution will be of great help.