HTML id property

GWT Designer allows you to quickly create the modules, composites, panels, remote services and other elements that comprise Google Web Tookit applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

HTML id property

Postby ctammes » Thu Jun 26, 2008 4:46 am

Hi,

Is it possible for GWT Designer to generate an id-property with the variable name? I use Selenium to test and using an id makes things easier.

So, instead of
Code: Select all
<button type="button" class="gwt-Button">OK</button>

I would like to have somthing like
Code: Select all
<button id="okButton" type="button" class="gwt-Button">OK</button>


When I add this property using Firebug, Selenium does the job.
ctammes
 
Posts: 6
Joined: Sun Oct 28, 2007 11:48 pm

Re: HTML id property

Postby Eric Clayberg » Sun Jun 29, 2008 6:21 am

In the latest build, if you turn on the Designer > Code Generation > Variable Names > Set variable name in widget data preference, Designer will add code like the following...

Code: Select all
DOM.setElementProperty(button4.getElement(), "id", "button4");


Image
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 3 guests