Templates generating links that behave like an Anchor

2011-09-20 Thread Daniel Guggi
hi, this is probably a basic question... I try to create some html using SafeHtmlTemplates like this: interface MyTemplates extends SafeHtmlTemplates { @Template(li id=\{0}\class=\{1}\a href=\\{2}/a/li) SafeHtml somelink(String id, String css, String text); } and use it

Re: Templates generating links that behave like an Anchor

2011-09-20 Thread Jens
Maybe you can add a unique Id to your a-tag and then use Element e = Document.get().getElementById(a-tag-id); Anchor anchor = Anchor.wrap(e); http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/user/client/ui/Anchor.html#wrap(com.google.gwt.dom.client.Element) -- You

Re: Templates generating links that behave like an Anchor

2011-09-20 Thread Daniel Guggi
Using this approach I get an assertError: java.lang.AssertionError: A widget that has an existing parent widget may not be added to the detach list at com.google.gwt.user.client.ui.RootPanel.detachOnWindowClose(RootPanel.java:136) at