Re: Deferred Binding with ClientBundle
I don't think there is a different way. Perhaps you could extend the ClientBundle Generator so it includes different images based on a custom property (or simply user.agent) in your gwt.xml, e.g. @Source("home-icon.svg") would be treated as default but the generator also searches for "<your.property.value>/home-icon.png" and uses this image if its available. But not sure if its possible.
Not sure if you can swap out the ClientBundle directly because they are generated, so I guess you may need ClientBundleFactories that you swap out with deferred binding, e.g.
HiDpiFactory extends AppClientBundleFactory {
MyClientBundle createMyClientBundle() {
return GWT.create(HiDpiMyClientBundle.class);
}
}
I would love to see a better solution!
-- J.
-- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/gdy7YiXcT-IJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home