The biggest problem here is that ids have to be unique within a document, and UiBinder has no way of enforcing this. If you want to use it for styling, you're probably better off with CssResource (we're working on updating the samples to reflect what we believe to be the best pattern for doing this).
As for testing, I assume you mean using something like Selenium. This is actually why we created the UIObject.ensureDebugId() stuff -- especially so that you can turn it off in deployment. But if you're using GWTTestCase, you can just bind the elements to fields and grab those directly. Cheers, joel. On Tue, Aug 25, 2009 at 10:38 PM, Richard Vowles <[email protected]>wrote: > > One of the things I have noticed with the UIBinder is that you can't > set the id on the fields - which is pretty important for css styling > and testing. I seem to have to set them in code. > > <g:TextBox ui:field="tbWhatever" id="some-name"/> > > causes it to fail to compile. I know id is an attribute of getElement > () but since this is a very common thing to do, I'd have expected > ui:id or some such (or just id being acceptable). Am I missing > something? > > Ta > Richard > > On Aug 26, 12:49 pm, Bruce Johnson <[email protected]> wrote: > > No plans to do drag-n-drop or anything wysiwyg. We'll probably > > continue to focus on the basics. > > > > --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
