Friday, January 24, 2014

Re: Phantom widget

Hi,
actually I'm using something you may find useful. I have a UiBinder template that holds something I call actions. Actions hold some properties that may be shared by multiple other widgets (like caption, image, hint, etc.) and they can be translated which is why I wan to to have this in UiBinder XML and I also don't want to duplicate the definition for each widget that uses the same action. So i created an ActionList which is a panel-like widget implementing HasWidgets interface, but it only attaches hidden span to the Document's DOM, all the child Widgets (in this case Actions) just extend Widget class but don't create any elements and are never attached to DOM by the ActionList. But you cannot create just one widget, you need the outer container that will get attached otherwise you would get an exception.

Honza

On Thursday, January 23, 2014 7:24:04 PM UTC+1, Stephen Leung wrote:
Hi GWT users,

Is it possible to create a fake/phantom Widget/Element such that when it is rendered no HTML code will be generated?

Thanks,
-Stephen

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment