tags:

views:

61

answers:

1

I searched high and low and cannot a button tag in any of the javaScript that is generated that referred to step 7 of the tutorial. I must be looking in the wrong places, or I'm generating the code incorrectly. I generated the code in the three different levels of detail. Can anyone point me in the right direction who's completed the tutorial or is more experience with the GWT? Looked in every file inside of the war directory. Of course I could have missed one! :-/ Would definitely like to be able to find this stuff on my own when I begin development.

Here's the link:

http://code.google.com/webtoolkit/doc/latest/tutorial/style.html

Look under 3. Associating style rules with GWT-generated HTML elements. What I'm specifically trying to find is the tag.

<button class="gwt-Button" tabindex="0" type="button">Add</button>

Of course you don't have to do the tutorial any project you've worked on should have similiar tags to be found I just can't find the file containing them...

I did find some stuff containing gwt-Button class name on line 3078 of one of those "unique" file names, but the way the author stated it made me think this process would be "easier". This was generated using the pretty compile.

function $Button(this$static, html){
  $ButtonBase(this$static, ($clinit_21() , $doc).createElement("<BUTTON type='button'><\/BUTTON>"));
  this$static.element['className'] = 'gwt-Button';
  this$static.element.innerHTML = html || '';
  return this$static;
}

This looks like it could be used to generate the tag. Is this a combination of some javaScript and some javaScript library code like JQuery or Prototype?

Thanks

+1  A: 

The best way I know to see the javascript generated by GWT is to use the Brain.jar DOM Viewer http://www.brainjar.com/dhtml/domviewer/

It's not the most user friendly, but if you click around, you can generally find the InnerHTML of some element that corresponds to the whole web page, and then search for "button" or the relevant keyword.

John
Thank you very much. While I probably won't be using Brain.jar, I had simply tunnel visioned myself into trying to find this within eclipse. Looking a Brain.jar I realized the easiest way to do what I was trying to do is to use Safari's element inspector or Firebug Element Inspector.
Derek Litz