On Tue, Oct 6, 2009 at 8:43 AM, Thomas Broyer <t.bro...@gmail.com> wrote:
> > On Tue, Oct 6, 2009 at 4:16 PM, BobV <b...@google.com> wrote: > > I've attached a very simple implementation (with source) of an > > IdResource that can be used with ClientBundle. You're welcome to > > adapt it to your needs, but I don't see any additional ClientBundle > > API making it into GWT 2.0 at this time. > > If I understand correctly, each IdResource declared in a ClientBundle > will generate an ID (in the form "id1", "id2", etc. unless @Prefix is > used); so I could use it in an ui.xml in, for instance <label > for="{res.a}">foo</label>...<input id="{res.a}" /> ? > > If I understand correctly how UiBinder works, for widgets, I'd still > have to "inject" the ID myself using > theWidget.getElement().setId(bundle.a().toString()) ? > That's a very bad idea. You're relying on the widget not to be using id for its own purposes, now and in the future. I don't think you should count on the label element ever playing nice with widgets, at least not soon. > > That's a step forward, thanks! > > We haven't migrated to trunk and UiBinder yet (I'm waiting for an > official release, i.e. the first milestone; and we're only moving from > 1.5 to 1.7 and from "written in the rush" spaghetti code to "well > designed" MVP+DI+EventBus+HTMLPanel+etc.), so I'll only test this > "later rather than sooner", but thanks anyway! > > -- > Thomas Broyer > /tɔ.ma.bʁwa.je/ <http://xn--nna.ma.xn--bwa-xxb.je/> > > > > --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---