<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jeff Douglas - Technology, Coding and Bears... OH MY! &#187; GWT</title>
	<atom:link href="http://blog.jeffdouglas.com/category/technology/gwt/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jeffdouglas.com</link>
	<description>Get your head out of your #@! and into the clouds!</description>
	<lastBuildDate>Thu, 02 Feb 2012 11:57:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>GWT UiBinder – Passing Objects to Widgets</title>
		<link>http://blog.jeffdouglas.com/2010/02/24/gwt-uibinder-passing-objects-to-widgets/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=gwt-uibinder-passing-objects-to-widgets</link>
		<comments>http://blog.jeffdouglas.com/2010/02/24/gwt-uibinder-passing-objects-to-widgets/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 12:52:45 +0000</pubDate>
		<dc:creator>Jeff Douglas</dc:creator>
				<category><![CDATA[Code Sample]]></category>
		<category><![CDATA[GWT]]></category>

		<guid isPermaLink="false">http://blog.jeffdouglas.com/?p=2228</guid>
		<description><![CDATA[A couple of weeks ago I wrote a GWT 2.0 tutorial for passing simple values to a widget and this is the (promised) follow up on how to pass an object to a widget. For more info on working with the new UiBinder, see Declarative Layout with UiBinder at the GWT site. The Entry Point [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.jeffdouglas.com%2F2010%2F02%2F24%2Fgwt-uibinder-passing-objects-to-widgets%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.jeffdouglas.com%2F2010%2F02%2F24%2Fgwt-uibinder-passing-objects-to-widgets%2F&amp;source=jeffdonthemic&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p style="clear: both"><a href="http://blog.jeffdouglas.com/wp-content/uploads/2009/12/gwt-logo.png" rel="lightbox[2228]"><img src="http://blog.jeffdouglas.com/wp-content/uploads/2009/12/gwt-logo.png" alt="" title="gwt-logo" width="100" height="100" class="alignleft size-full wp-image-1841" /></a>A couple of weeks ago I wrote a GWT 2.0 tutorial for <a href="http://blog.jeffdouglas.com/2010/02/05/gwt-uibinder-passing-parameters-to-widgets/" target="_blank">passing simple values to a widget</a> and this is the (promised) follow up on how to pass an object to a widget. For more info on working with the new UiBinder, see <a href="http://code.google.com/webtoolkit/doc/latest/DevGuideUiBinder.html" target="_blank">Declarative Layout with UiBinder</a> at the GWT site.</p>
<p style="clear: both">The Entry Point class is fairly simple; it creates a new MyPanel object and adds it to the RootPanel.</p>
<p style="clear: both"><strong>MyEntryPoint.java</strong></p>
<p style="clear: both">

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">package com.jeffdouglas.client;
&nbsp;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;
&nbsp;
public class MyEntryPoint implements EntryPoint {
&nbsp;
  @Override
  public void onModuleLoad() {
    MyPanel p = new MyPanel();
    RootPanel.get().add(p);
  }
&nbsp;
}</pre></td></tr></table></div>

</p>
<p style="clear: both">In the constructor, the MyPanel owner class creates a new SomeObject object with some text and then initializes the widget. <strong><em>The @UiFactory annotation is how you provide arguments for the constructor of the SomeWidget widget.</em></strong> The UiBinder template simply sets up the name space and adds the widget to the HTMLPanel.</p>
<p style="clear: both"><strong>MyPanel.java</strong></p>
<p style="clear: both">

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">package com.jeffdouglas.client;
&nbsp;
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiFactory;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;
&nbsp;
public class MyPanel extends Composite {
&nbsp;
  private static MyPanelUiBinder uiBinder = GWT.create(MyPanelUiBinder.class);
&nbsp;
  interface MyPanelUiBinder extends UiBinder&lt;widget, MyPanel&gt; {
  }
&nbsp;
  private SomeObject someObject;
&nbsp;
  public MyPanel() {
    this.someObject = new SomeObject(&quot;My object text&quot;);
    initWidget(uiBinder.createAndBindUi(this));
  }
&nbsp;
  // Add a UI Factory method for the sub-widget &amp; pass object
  @UiFactory
  SomeWidget makeSomeWidget() {
    return new SomeWidget(someObject);
  }
&nbsp;
}</pre></td></tr></table></div>

</p>
<p style="clear: both"><strong>MyPanel.ui.xml</strong></p>
<p style="clear: both">

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">&lt;!DOCTYPE ui:UiBinder SYSTEM &quot;http://dl.google.com/gwt/DTD/xhtml.ent&quot;&gt;
&lt;ui:UiBinder xmlns:ui=&quot;urn:ui:com.google.gwt.uibinder&quot;
	xmlns:g=&quot;urn:import:com.google.gwt.user.client.ui&quot;
	xmlns:c=&quot;urn:import:com.jeffdouglas.client&quot;&gt;
	&lt;g:HTMLPanel&gt;
	   &lt;c:SomeWidget/&gt;
	&lt;/g:HTMLPanel&gt;
&lt;/ui:UiBinder&gt;</pre></td></tr></table></div>

</p>
<p style="clear: both">The SomeWidget class is pretty simple also. The constructor accepts SomeObject, sets it to the class member, initializes the widget and then sets the text of the displayText UiField to the name value in the SomeObject.</p>
<p style="clear: both"><strong>SomeWidget.java</strong></p>
<p style="clear: both">

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">package com.jeffdouglas.client;
&nbsp;
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Widget;
&nbsp;
public class SomeWidget extends Composite {
&nbsp;
  private static SomeWidgetUiBinder uiBinder = GWT
          .create(SomeWidgetUiBinder.class);
&nbsp;
  interface SomeWidgetUiBinder extends UiBinder&lt;widget, SomeWidget&gt; {
  }
&nbsp;
  private SomeObject someObject;
&nbsp;
  @UiField Label displayText;
&nbsp;
  public SomeWidget(SomeObject so) {
    this.someObject = so;
    initWidget(uiBinder.createAndBindUi(this));
    displayText.setText(someObject.getName());
  }
&nbsp;
}</pre></td></tr></table></div>

</p>
<p style="clear: both"><strong>SomeWidget.ui.xml</strong></p>
<p style="clear: both">

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">&lt;!DOCTYPE ui:UiBinder SYSTEM &quot;http://dl.google.com/gwt/DTD/xhtml.ent&quot;&gt;
&lt;ui:UiBinder xmlns:ui=&quot;urn:ui:com.google.gwt.uibinder&quot;
    xmlns:g=&quot;urn:import:com.google.gwt.user.client.ui&quot;&gt;
    &lt;g:HTMLPanel&gt;
        &lt;g:Label ui:field=&quot;displayText&quot;/&gt;
    &lt;/g:HTMLPanel&gt;
&lt;/ui:UiBinder&gt;</pre></td></tr></table></div>

</p>
<p style="clear: both"><strong>SomeObject.java</strong></p>
<p style="clear: both">

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">package com.jeffdouglas.client;
&nbsp;
public class SomeObject {
&nbsp;
  private String name;
&nbsp;
  public SomeObject(String name) {
    this.name = name;
  }
&nbsp;
  public String getName() {
    return name;
  }
&nbsp;
  public void setName(String name) {
    this.name = name;
  }
&nbsp;
}</pre></td></tr></table></div>

</p>
<p><br class="final-break" style="clear: both" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jeffdouglas.com/2010/02/24/gwt-uibinder-passing-objects-to-widgets/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>UiBinder with SuggestBox &amp; MultiWordSuggestOracle</title>
		<link>http://blog.jeffdouglas.com/2010/02/11/uibinder-with-suggestbox-multiwordsuggestoracle/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=uibinder-with-suggestbox-multiwordsuggestoracle</link>
		<comments>http://blog.jeffdouglas.com/2010/02/11/uibinder-with-suggestbox-multiwordsuggestoracle/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 05:08:07 +0000</pubDate>
		<dc:creator>Jeff Douglas</dc:creator>
				<category><![CDATA[Code Sample]]></category>
		<category><![CDATA[GWT]]></category>

		<guid isPermaLink="false">http://blog.jeffdouglas.com/?p=2128</guid>
		<description><![CDATA[I&#8217;ve been working on a somewhat large and complex GWT project using UiBinder over the past couple of weeks. I&#8217;ve built a number of widgets that use the SuggestBox and MultiWordSuggestOracle but I created a new UiBinder, populated the suggestions but they came up blank in the type-ahead. After about a half hour of scratching [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.jeffdouglas.com%2F2010%2F02%2F11%2Fuibinder-with-suggestbox-multiwordsuggestoracle%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.jeffdouglas.com%2F2010%2F02%2F11%2Fuibinder-with-suggestbox-multiwordsuggestoracle%2F&amp;source=jeffdonthemic&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p style="clear: both">I&#8217;ve been working on a somewhat large and complex <a href="http://code.google.com/webtoolkit" target="_blank">GWT</a> project using <a href="http://code.google.com/webtoolkit/doc/latest/DevGuideUiBinder.html" target="_blank">UiBinder</a> over the past couple of weeks. I&#8217;ve built a number of widgets that use the SuggestBox and MultiWordSuggestOracle but I created a new UiBinder, populated the suggestions but they came up blank in the type-ahead. After about a half hour of scratching my head I looked back at some other code and figured it out. There are very few examples of the SuggestBox with UiBinder so I thought this might help someone out.</p>
<p style="clear: both">The UiBinder template (MyWidget.ui.xml) is fairly simple:</p>
<p style="clear: both">

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">&lt;!DOCTYPE ui:UiBinder SYSTEM &quot;http://dl.google.com/gwt/DTD/xhtml.ent&quot;&gt;
&lt;ui:UiBinder xmlns:ui=&quot;urn:ui:com.google.gwt.uibinder&quot;
    xmlns:g=&quot;urn:import:com.google.gwt.user.client.ui&quot;&gt;
    &lt;g:HTMLPanel&gt;
        &lt;g:SuggestBox ui:field=&quot;mySuggestBox&quot;/&gt;
    &lt;/g:HTMLPanel&gt;
&lt;/ui:UiBinder&gt;</pre></td></tr></table></div>

</p>
<p style="clear: both">The owner class (MyWidget.java) is where you need to make sure you have things correct. On line #20 you need to ensure you have <strong>(provided = true)</strong> or your suggestions will not show in the type-ahead. You also need to create your SuggestBox before you initialize the UiBinder;</p>
<p style="clear: both">

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">package com.jeffdouglas;
&nbsp;
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.MultiWordSuggestOracle;
import com.google.gwt.user.client.ui.SuggestBox;
import com.google.gwt.user.client.ui.Widget;
&nbsp;
public class MyWidget extends Composite {
&nbsp;
  private static MyWidgetUiBinder uiBinder = GWT.create(MyWidgetUiBinder.class);
&nbsp;
  interface MyWidgetUiBinder extends UiBinder&lt;widget, MyWidget&gt; {
  }
&nbsp;
  private final MultiWordSuggestOracle mySuggestions = new MultiWordSuggestOracle();
&nbsp;
  @UiField(provided = true) // MAKE SURE YOU HAVE THIS LINE
  SuggestBox mySuggestBox;
&nbsp;
  public MyWidget() {
    mySuggestBox = new SuggestBox(mySuggestions);
    initWidget(uiBinder.createAndBindUi(this));
    getSuggestions();
  }
&nbsp;
  private void getSuggestions() {
    // call some service to load the suggestions
    mySuggestions.add(&quot;Suggestion #1&quot;);
    mySuggestions.add(&quot;Suggestion #2&quot;);
    mySuggestions.add(&quot;Suggestion #3&quot;);
  }
&nbsp;
}</pre></td></tr></table></div>

</p>
<p><br class="final-break" style="clear: both" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jeffdouglas.com/2010/02/11/uibinder-with-suggestbox-multiwordsuggestoracle/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>GWT UiBinder – Passing Parameters to Widgets</title>
		<link>http://blog.jeffdouglas.com/2010/02/05/gwt-uibinder-passing-parameters-to-widgets/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=gwt-uibinder-passing-parameters-to-widgets</link>
		<comments>http://blog.jeffdouglas.com/2010/02/05/gwt-uibinder-passing-parameters-to-widgets/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 15:02:38 +0000</pubDate>
		<dc:creator>Jeff Douglas</dc:creator>
				<category><![CDATA[Code Sample]]></category>
		<category><![CDATA[GWT]]></category>

		<guid isPermaLink="false">http://blog.jeffdouglas.com/?p=2100</guid>
		<description><![CDATA[I received a number of emails regarding my last post, GWT UiBinder Hello World Tutorial, specifically how to pass values into widgets using the new GWT 2.0 UiBinder. Here&#8217;s a small tutorial on one of the ways in which you could do that. I plan on another tutorial on passing multiple objects using the @UiFactory [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.jeffdouglas.com%2F2010%2F02%2F05%2Fgwt-uibinder-passing-parameters-to-widgets%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.jeffdouglas.com%2F2010%2F02%2F05%2Fgwt-uibinder-passing-parameters-to-widgets%2F&amp;source=jeffdonthemic&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p style="clear: both"><a href="http://blog.jeffdouglas.com/wp-content/uploads/2009/12/gwt-logo.png" rel="lightbox[2100]"><img src="http://blog.jeffdouglas.com/wp-content/uploads/2009/12/gwt-logo.png" alt="" title="gwt-logo" width="100" height="100" class="alignleft size-full wp-image-1841" /></a>I received a number of emails regarding my last post, <a href="http://blog.jeffdouglas.com/2010/01/19/gwt-uibinder-hello-world-tutorial/" target="_blank">GWT UiBinder Hello World Tutorial</a>, specifically how to pass values into widgets using the new <a href="http://code.google.com/webtoolkit/doc/latest/DevGuideUiBinder.html" target="_blank">GWT 2.0 UiBinder</a>. Here&#8217;s a small tutorial on one of the ways in which you could do that. I plan on another tutorial on passing multiple objects using the @UiFactory method.</p>
<p style="clear: both">So here is the Entry Point class. When the module loads, it creates a new MyPanel object, passes the text &#8220;Random Text&#8221; to the constructor and then adds the panel to the RootPanel.</p>
<p style="clear: both">
<strong>MyEntryPoint.java</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">package com.jeffdouglas.client;
&nbsp;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;
&nbsp;
public class MyEntryPoint implements EntryPoint {
&nbsp;
	public void onModuleLoad() {
		MyPanel p = new MyPanel(&quot;Random Text&quot;);
		RootPanel.get().add(p);
	}
&nbsp;
}</pre></td></tr></table></div>

</p>
<p style="clear: both">The MyPanel owner class defines a new constructor that accepts the passed string value (i.e. &#8220;Random Text&#8221;) and sets the value of hidden field called <em>myField</em> in the UiBinder template to this text.</p>
<p style="clear: both">
<strong>MyPanel.java</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">package com.jeffdouglas.client;
&nbsp;
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Hidden;
import com.google.gwt.user.client.ui.Widget;
&nbsp;
public class MyPanel extends Composite {
&nbsp;
	private static MyPanelUiBinder uiBinder = GWT.create(MyPanelUiBinder.class);
&nbsp;
	interface MyPanelUiBinder extends UiBinder&lt;widget, MyPanel&gt; {
	}
&nbsp;
	@UiField(provided=true)
	Hidden myField;
&nbsp;
	public MyPanel(String someText) {
		Hidden myField = new Hidden();
		myField.setValue(someText);
		initWidget(uiBinder.createAndBindUi(this));
	}
&nbsp;
}</pre></td></tr></table></div>

</p>
<p style="clear: both">When the UiBinder template runs, its owner class loads the value (&#8220;Random Text&#8221;) into the Hidden field which then passes this same value into the SomeWidget widget.</p>
<p style="clear: both">
<strong>MyPanel.ui.xml</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">&lt;!DOCTYPE ui:UiBinder SYSTEM &quot;http://dl.google.com/gwt/DTD/xhtml.ent&quot;&gt;
&lt;ui:UiBinder xmlns:ui=&quot;urn:ui:com.google.gwt.uibinder&quot;
	xmlns:g=&quot;urn:import:com.google.gwt.user.client.ui&quot;
	xmlns:c=&quot;urn:import:com.jeffdouglas.client&quot;&gt;
	&lt;g:HTMLPanel&gt;
	   &lt;g:Hidden ui:field=&quot;myField&quot;/&gt;
	   &lt;c:SomeWidget myField=&quot;{myField.getValue}&quot;/&gt;
	&lt;/g:HTMLPanel&gt;
&lt;/ui:UiBinder&gt;</pre></td></tr></table></div>

</p>
<p style="clear: both">The SomeWidget owner class is fairly straight forward. There is a setter method for MyField which runs after the constructor, receives the text (&#8220;Random Text&#8221;) and writes it to the <em>displayText</em> field in the UiBinder template.</p>
<p style="clear: both">
<strong>SomeWidget.java</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">package com.jeffdouglas.client;
&nbsp;
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Widget;
&nbsp;
public class SomeWidget extends Composite {
&nbsp;
	private static SomeWidgetUiBinder uiBinder = GWT
			.create(SomeWidgetUiBinder.class);
&nbsp;
	interface SomeWidgetUiBinder extends UiBinder&lt;widget, SomeWidget&gt; {
	}
&nbsp;
	@UiField Label displayText;
&nbsp;
	public void setMyField(String t) {
		displayText.setText(t);
	}
&nbsp;
	public SomeWidget() {
		initWidget(uiBinder.createAndBindUi(this));
	}
&nbsp;
}</pre></td></tr></table></div>

</p>
<p style="clear: both">The UiBinder template simply displays the text in an HTMLPanel.</p>
<p style="clear: both">
<strong>SomeWidget.ui.xml</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">&lt;!DOCTYPE ui:UiBinder SYSTEM &quot;http://dl.google.com/gwt/DTD/xhtml.ent&quot;&gt;
&lt;ui:UiBinder xmlns:ui=&quot;urn:ui:com.google.gwt.uibinder&quot;
	xmlns:g=&quot;urn:import:com.google.gwt.user.client.ui&quot;&gt;
	&lt;g:HTMLPanel&gt;
	   &lt;g:Label ui:field=&quot;displayText&quot;/&gt;
	&lt;/g:HTMLPanel&gt;
&lt;/ui:UiBinder&gt;</pre></td></tr></table></div>

</p>
<p><br class="final-break" style="clear: both" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jeffdouglas.com/2010/02/05/gwt-uibinder-passing-parameters-to-widgets/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>GWT UiBinder Hello World Tutorial</title>
		<link>http://blog.jeffdouglas.com/2010/01/19/gwt-uibinder-hello-world-tutorial/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=gwt-uibinder-hello-world-tutorial</link>
		<comments>http://blog.jeffdouglas.com/2010/01/19/gwt-uibinder-hello-world-tutorial/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 23:26:03 +0000</pubDate>
		<dc:creator>Jeff Douglas</dc:creator>
				<category><![CDATA[Code Sample]]></category>
		<category><![CDATA[GWT]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google App Engine]]></category>

		<guid isPermaLink="false">http://blog.jeffdouglas.com/?p=2041</guid>
		<description><![CDATA[I&#8217;ve been working on a new project the past couple of weeks that (fortunately) requires Google Web Toolkit (GWT) and I wanted to use the new UiBinder that was released with GWT 2.0 in early December for a number of reasons (clean separation of UI and code, easier collaboration with designers, easier testing, etc ). [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.jeffdouglas.com%2F2010%2F01%2F19%2Fgwt-uibinder-hello-world-tutorial%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.jeffdouglas.com%2F2010%2F01%2F19%2Fgwt-uibinder-hello-world-tutorial%2F&amp;source=jeffdonthemic&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p style="clear: both">I&#8217;ve been working on a new project the past couple of weeks that (fortunately) requires <a href="http://code.google.com/webtoolkit" title="GWT" target="_blank">Google Web Toolkit</a> (GWT) and I wanted to use the new <a href="http://code.google.com/webtoolkit/doc/latest/DevGuideUiBinder.html" title="UiBinder" target="_blank">UiBinder</a> that was released with GWT 2.0 in early December for a number of reasons (clean separation of UI and code, easier collaboration with designers, easier testing, etc ). However, I was having a hard time getting my head wrapped around it given that the GWT site has very little documentation and only a few examples. I&#8217;ve combed through the message boards, the docs and the sample Mail application that comes with the SDK and after finally groking the new functionality, I put together a little Hello World app, the kind that would have helped me out originally. </p>
<p style="clear: both">So I&#8217;m making some assumptions that you already have the GWT SDK and Eclipse Plugin installed and are familiar with both of them. If you are not, take a look at the <a href="http://code.google.com/webtoolkit" target="_blank">GWT site</a> for more info.</p>
<p style="clear: both">To get started, create a new Web Application Project called &#8220;HelloUiBinder&#8221; in the package of your choice but do not check &#8220;Use Google App Engine&#8221;.</p>
<p style="clear: both"><a href="http://blog.jeffdouglas.com/wp-content/uploads/2010/01/uibinder-new-project1.png" class="image-link" rel="lightbox[2041]"><img class="linked-to-original" src="http://blog.jeffdouglas.com/wp-content/uploads/2010/01/uibinder-new-project1-thumb.png" height="575" align="left" width="509" style=" display: inline; float: left; margin: 0 10px 10px 0;" /></a><br style="clear: both" />Now create a new UiBinder template and owner class (File -> New -> UiBinder). Choose the client package for the project and then name it <em>MyBinderWidget</em>. Leave all of the other defaults. When you click Finish the plugin will create a new UiBinder template and owner class.</p>
<p style="clear: both"><a href="http://blog.jeffdouglas.com/wp-content/uploads/2010/01/uibinder-new-binder.png" class="image-link" rel="lightbox[2041]"><img class="linked-to-original" src="http://blog.jeffdouglas.com/wp-content/uploads/2010/01/uibinder-new-binder-thumb.png" height="500" align="left" width="530" style=" display: inline; float: left; margin: 0 10px 10px 0;" /></a><br style="clear: both" />Open the <em>MyBinderWidget.ui.xml</em> template and add the following code. With GWT you can define your styles either in your template where you need them or externally. I&#8217;ve added a small style inline that adds some pizzaz to the label. Notice the field name <em>myPanelContent</em> in the template. You can programmatically read and write to this field from the template&#8217;s owner class. So when the owner class runs, it construct a new VerticalPanel, does something with it (probably add some type of content) and then fill this field with it.</p>
<p style="clear: both">Attributes for the elements (the text attribute in the Label element for example) correspond to a setter method for the widget. Unfortunately there is no code completion to get a list of these attributes in Eclipse when you hit the space bar so you either have to know the setters or refer to the JavaDocs each time. A painful process.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">&lt;!DOCTYPE ui:UiBinder SYSTEM &quot;http://dl.google.com/gwt/DTD/xhtml.ent&quot;&gt;
&lt;ui:UiBinder xmlns:ui=&quot;urn:ui:com.google.gwt.uibinder&quot;
     xmlns:g=&quot;urn:import:com.google.gwt.user.client.ui&quot;&gt;
     &lt;ui:style&gt;
          .bolder { font-weight:bold; }
     &lt;/ui:style&gt;
     &lt;g:HTMLPanel&gt;
          &lt;g:Label styleName=&quot;{style.bolder}&quot; text=&quot;This is my label in bold!&quot;/&gt;
          &lt;g:VerticalPanel ui:field=&quot;myPanelContent&quot; spacing=&quot;5&quot;/&gt;
     &lt;/g:HTMLPanel&gt;
&lt;/ui:UiBinder&gt;</pre></td></tr></table></div>

<p style="clear: both">For the owner class, <em>MyBinderWidget.java</em>, add the following code. In this class, a field with the same name, <em>myPanelContent</em>, is marked with the @UiField annotation. When uiBinder.createAndBindUi(this) is run, the content is created for the VerticalPanel and the template field is filled with the new instance.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">package com.jeffdouglas.client;
&nbsp;
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
&nbsp;
public class MyBinderWidget extends Composite {
&nbsp;
     private static MyBinderWidgetUiBinder uiBinder = GWT
               .create(MyBinderWidgetUiBinder.class);
&nbsp;
     interface MyBinderWidgetUiBinder extends UiBinder&lt;widget, MyBinderWidget&gt; { }
&nbsp;
     @UiField VerticalPanel myPanelContent;
&nbsp;
     public MyBinderWidget() {
          initWidget(uiBinder.createAndBindUi(this));
&nbsp;
          HTML html1 = new HTML();
          html1.setHTML(&quot;&lt;a href='http://www.google.com'&gt;Click me!&lt;/a&gt;&quot;);
          myPanelContent.add(html1);
          HTML html2 = new HTML();
          html2.setHTML(&quot;This is my sample &lt;b&gt;content&lt;/b&gt;!&quot;);
          myPanelContent.add(html2);
&nbsp;
     }
&nbsp;
}</pre></td></tr></table></div>

<p style="clear: both">Now change the entry point class to look like the following.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">package com.jeffdouglas.client;
&nbsp;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;
&nbsp;
public class HelloUiBinder implements EntryPoint {
&nbsp;
     public void onModuleLoad() {
          MyBinderWidget w = new MyBinderWidget();
          RootPanel.get().add(w);
     }
}</pre></td></tr></table></div>

<p style="clear: both">Now open <em>HelloUiBinder.html</em> and remove all of the HTML content between the &lt;/noscript&gt; and and &lt;/body&gt; save it. Once you run the application, copy the development URL and run paste it into your favorite supported browser, you should see the following.</p>
<p style="clear: both"><a href="http://blog.jeffdouglas.com/wp-content/uploads/2010/01/uibinder-results.png" class="image-link" rel="lightbox[2041]"><img class="linked-to-original" src="http://blog.jeffdouglas.com/wp-content/uploads/2010/01/uibinder-results-thumb.png" height="117" align="left" width="265" style=" display: inline; float: left; margin: 0 10px 10px 0;" /></a><br style="clear: both" />Now suppose you wanted to nest a widget inside your MyBinderWidget that did something when a button was clicked. We&#8217;ll create a small series of checkboxes that allows the user to select their favorite colors and display them when the button is clicked. Create a new UiBinder called <em>FavoriteColorWidget</em> in the client package. Add the following code to the <em>FavoriteColorWidget.ui.xml</em> template.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">&lt;ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
    xmlns:g='urn:import:com.google.gwt.user.client.ui'&gt;
    &lt;g:VerticalPanel&gt;
      &lt;g:Label ui:field=&quot;greeting&quot;/&gt;
      &lt;g:Label&gt;Choose your favorite color(s):&lt;/g:Label&gt;
      &lt;g:CheckBox ui:field=&quot;red&quot; formValue=&quot;red&quot;&gt;Red&lt;/g:CheckBox&gt;
      &lt;g:CheckBox ui:field=&quot;white&quot; formValue=&quot;white&quot;&gt;White&lt;/g:CheckBox&gt;
      &lt;g:CheckBox ui:field=&quot;blue&quot; formValue=&quot;blue&quot;&gt;Blue&lt;/g:CheckBox&gt;
      &lt;g:Button ui:field=&quot;button&quot;&gt;Submit&lt;/g:Button&gt;
    &lt;/g:VerticalPanel&gt;
&lt;/ui:UiBinder&gt;</pre></td></tr></table></div>

<p style="clear: both">Now add the click handler in the <em>FavoriteColorWidget.java</em> owner class.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">package com.jeffdouglas.client;
&nbsp;
import java.util.ArrayList;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.CheckBox;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;
&nbsp;
public class FavoriteColorWidget extends Composite {
&nbsp;
     private static FavoriteColorWidgetUiBinder uiBinder = GWT
               .create(FavoriteColorWidgetUiBinder.class);
&nbsp;
     interface FavoriteColorWidgetUiBinder extends
               UiBinder&lt;widget, FavoriteColorWidget&gt; {
     }
&nbsp;
     @UiField Label greeting;
     @UiField CheckBox red;
     @UiField CheckBox white;
     @UiField CheckBox blue;
     @UiField Button button;
&nbsp;
     public FavoriteColorWidget() {
          initWidget(uiBinder.createAndBindUi(this));
&nbsp;
          // add a greeting
          greeting.setText(&quot;Hello Jeff!!&quot;);
&nbsp;
          final ArrayList&lt;checkBox&gt; checkboxes = new ArrayList&lt;checkBox&gt;();
          checkboxes.add(red);
          checkboxes.add(white);
          checkboxes.add(blue);
&nbsp;
         // add a button handler to show the color when clicked
          button.addClickHandler(new ClickHandler() {
               public void onClick(ClickEvent event) {
                    String t = &quot;&quot;;
                    for(CheckBox box : checkboxes) {
                         // if the box was checked
                         if (box.getValue()) {
                              t += box.getFormValue() + &quot;, &quot;;
                         }
                    }
                    Window.alert(&quot;Your favorite color/colors are: &quot;+ t);
               }
          });
&nbsp;
     }
&nbsp;
}</pre></td></tr></table></div>

<p style="clear: both">The last thing we&#8217;ll need to do is add our new widget to the MyBinderWidget template. Open <em>MyBinderWidget.ui.xml</em> and add the custom namespace reference and the FavoriteColorWidget.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">&lt;!DOCTYPE ui:UiBinder SYSTEM &quot;http://dl.google.com/gwt/DTD/xhtml.ent&quot;&gt;;
&lt;ui:UiBinder xmlns:ui=&quot;urn:ui:com.google.gwt.uibinder&quot;
     xmlns:g=&quot;urn:import:com.google.gwt.user.client.ui&quot;
     xmlns:c=&quot;urn:import:com.jeffdouglas.client&quot;&gt;
     &lt;ui:style&gt;
          .bolder { font-weight:bold; }
     &lt;/ui:style&gt;
     &lt;g:HTMLPanel&gt;
          &lt;g:Label styleName=&quot;{style.bolder}&quot; text=&quot;This is my label in bold!&quot;/&gt;
          &lt;g:VerticalPanel ui:field=&quot;myPanelContent&quot; spacing=&quot;5&quot;/&gt;
          &lt;c:FavoriteColorWidget/&gt;
     &lt;/g:HTMLPanel&gt;
&lt;/ui:UiBinder&gt;</pre></td></tr></table></div>

<p style="clear: both">Now when you run the application it should look like the following.</p>
<p style="clear: both"><a href="http://blog.jeffdouglas.com/wp-content/uploads/2010/01/uibinder-results2.png" class="image-link" rel="lightbox[2041]"><img class="linked-to-original" src="http://blog.jeffdouglas.com/wp-content/uploads/2010/01/uibinder-results2-thumb.png" height="191" align="left" width="550" style=" display: inline; float: left; margin: 0 10px 10px 0;" /></a></p>
<p>  <br class="final-break" style="clear: both" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jeffdouglas.com/2010/01/19/gwt-uibinder-hello-world-tutorial/feed/</wfw:commentRss>
		<slash:comments>48</slash:comments>
		</item>
		<item>
		<title>Google Releases Google Web Toolkit 2.0</title>
		<link>http://blog.jeffdouglas.com/2009/12/09/google-releases-google-web-toolkit-2/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=google-releases-google-web-toolkit-2</link>
		<comments>http://blog.jeffdouglas.com/2009/12/09/google-releases-google-web-toolkit-2/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 13:12:29 +0000</pubDate>
		<dc:creator>Jeff Douglas</dc:creator>
				<category><![CDATA[GWT]]></category>
		<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://blog.jeffdouglas.com/?p=1840</guid>
		<description><![CDATA[Google released Google Web Toolkit 2.0 (GWT) yesterday with some really cool features and improvements. For those of you not familiar with GWT, it is a development toolkit for building and optimizing complex browser-based applications. You write your front-end code in Java and it is auto-magically compiled into cross browser, optimized JavaScript. GWT is used by [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.jeffdouglas.com%2F2009%2F12%2F09%2Fgoogle-releases-google-web-toolkit-2%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.jeffdouglas.com%2F2009%2F12%2F09%2Fgoogle-releases-google-web-toolkit-2%2F&amp;source=jeffdonthemic&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://code.google.com/gwt"><img class="alignleft size-full wp-image-1841" style="padding-right:10px;" title="gwt-logo" src="http://blog.jeffdouglas.com/wp-content/uploads/2009/12/gwt-logo.png" alt="" width="100" height="100" /></a>Google released <a href="http://code.google.com/gwt" target="_blank">Google Web Toolkit 2.0</a> (GWT) yesterday with some really cool features and improvements. For those of you not familiar with GWT, it is a development toolkit for building and optimizing complex browser-based applications. You write your front-end code in Java and it is auto-magically compiled into cross browser, optimized JavaScript.</p>
<p>GWT is used by many products at Google, including Google Wave and Google AdWords. It&#8217;s open source, completely free, and used by thousands of developers around the world.</p>
<p>The video below does a really nice feature overview but here are some of my bullet points from the video. You can <a href="http://code.google.com/webtoolkit/doc/latest/ReleaseNotes.html" target="_blank">find more detailed info on the new features here</a>.</p>
<ul>
<li><strong>Declarative User Interface</strong> &#8211; gone are the days of programmatically laying out your application in a Swing type manner. Similar to Adobe Flex, the new <strong>UiBinder</strong> allows you to lay out your user interface in an XML file and then bind that to a Java class that contains applications logic. This is my favorite new feature!</li>
<li><strong>Speed Tracer</strong> &#8211; a new tool that helps you analyze the performance of any web page and understand where the various sources of latency are.</li>
<li><strong>Easier Styling</strong> &#8211; with the new <strong>UiStyle</strong> feature you can write CSS styles and bundle them directly in the template. You get the speed benefit of no extra http roundtrip to fetch an external the stylesheet and prevent name conflicts across your application when using widgets.</li>
<li><strong>Predictable Performance</strong> &#8211; provide a consistent look and feel with improved layout panels that behave predictably and load quickly.</li>
<li><strong>Debug in any Browser</strong> &#8211; no more requirement to use the embedded browser when debugging Java source code. You can now debug in essentially any browser and use development tools for that browser like Firebug in Firefox.</li>
<li><strong>Faster Load Times</strong> &#8211; Developer-guided code splitting allows you to chunk your GWT code into multiple fragments for faster startup.</li>
<li><strong>Improved IDE Support</strong> &#8211; the new Eclipse plugin provides support for the UiBinder, client bundling, RPC refactoring, wizards to generate boilerplate code and the new development mode.</li>
</ul>
<p>There are a ton of additional features and you can <a href="http://code.google.com/webtoolkit/doc/latest/ReleaseNotes.html" target="_blank">check them out here</a>. Download GWT today and get started building some kickass apps!</p>
<p><span class="youtube">
<object width="480" height="385">
<param name="movie" value="http://www.youtube.com/v/uExEw3OVMd0?color1=d6d6d6&amp;color2=f0f0f0&amp;border=0&amp;fs=1&amp;hl=en&amp;loop=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=1&amp;w=550" />
<param name="allowFullScreen" value="true" />
<embed wmode="opaque" src="http://www.youtube.com/v/uExEw3OVMd0?color1=d6d6d6&amp;color2=f0f0f0&amp;border=0&amp;fs=1&amp;hl=en&amp;loop=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=1&amp;w=550" type="application/x-shockwave-flash" allowfullscreen="true" width="480" height="385"></embed>
<param name="wmode" value="opaque" />
</object>
</span><p><a href="http://www.youtube.com/watch?v=uExEw3OVMd0">www.youtube.com/watch?v=uExEw3OVMd0</a></p></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jeffdouglas.com/2009/12/09/google-releases-google-web-toolkit-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Web Toolkit 2.0 M1 Announced</title>
		<link>http://blog.jeffdouglas.com/2009/10/07/gwt-2-m1-announced/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=gwt-2-m1-announced</link>
		<comments>http://blog.jeffdouglas.com/2009/10/07/gwt-2-m1-announced/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 09:49:52 +0000</pubDate>
		<dc:creator>Jeff Douglas</dc:creator>
				<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[GWT]]></category>

		<guid isPermaLink="false">http://blog.jeffdouglas.com/?p=1451</guid>
		<description><![CDATA[The first milestone build for GWT 2.0 was released a couple of days ago with an announcement on Google Groups. You can download the M1 zip here. Some of the cool new features in GWT 2.0 include: In-Browser Development Mode &#8211; now you can develop in your favorite browser instead of using the &#8220;hosted browser&#8221;. [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.jeffdouglas.com%2F2009%2F10%2F07%2Fgwt-2-m1-announced%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.jeffdouglas.com%2F2009%2F10%2F07%2Fgwt-2-m1-announced%2F&amp;source=jeffdonthemic&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>The first milestone build for GWT 2.0 was released a couple of days ago with an <a href="http://groups.google.com/group/google-web-toolkit/browse_thread/thread/8b79ebe444b9126d" target="_blank">announcement on Google Groups</a>. You can download the M1 zip <a href="http://code.google.com/p/google-web-toolkit/downloads/list?can=1&amp;q=2.0+Milestone+1" target="_blank">here</a>.</p>
<p>Some of the cool new features in GWT 2.0 include:</p>
<ul>
<li>In-Browser Development Mode &#8211; now you can develop in your favorite browser instead of using the &#8220;hosted browser&#8221;.</li>
<li>Code Splitting &#8211; you can split your code into multiple fragments allowing your application to download faster and bootstrap itself with the minimum about of required code.</li>
<li>Declarative User Interface &#8211; use XML to declarativly lay out your UI as opposed to programmatically.</li>
<li>Bundling of resources (ClientBundle) &#8211; build bundles of text, CSS and HTML files for download optimization.</li>
<li>Using HtmlUnit for running GWT tests &#8211; debugging GWT Tests in development mode can now be done entirely in a Java debugger.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.jeffdouglas.com/2009/10/07/gwt-2-m1-announced/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Snow Leopard Breaks Google Web Toolkit</title>
		<link>http://blog.jeffdouglas.com/2009/09/01/snow-leopard-breaks-google-web-toolkit/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=snow-leopard-breaks-google-web-toolkit</link>
		<comments>http://blog.jeffdouglas.com/2009/09/01/snow-leopard-breaks-google-web-toolkit/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 05:05:05 +0000</pubDate>
		<dc:creator>Jeff Douglas</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[GWT]]></category>
		<category><![CDATA[Google App Engine]]></category>

		<guid isPermaLink="false">http://blog.jeffdouglas.com/?p=1164</guid>
		<description><![CDATA[I installed Snow Leopard the other day in under 60 minutes without a hitch&#8230;. or so I thought. When trying to run my App Engine project with GWT, I received the following fatal error: You must use a Java 1.5 runtime to use GWT Hosted Mode on Mac OS X. I did a search and [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.jeffdouglas.com%2F2009%2F09%2F01%2Fsnow-leopard-breaks-google-web-toolkit%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.jeffdouglas.com%2F2009%2F09%2F01%2Fsnow-leopard-breaks-google-web-toolkit%2F&amp;source=jeffdonthemic&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I installed Snow Leopard the other day in under 60 minutes without a hitch&#8230;. or so I thought.</p>
<p>When trying to run my App Engine project with GWT, I received the following fatal error:</p>
<blockquote><p><strong>You must use a Java 1.5 runtime to use GWT Hosted Mode on Mac OS X.</strong></p></blockquote>
<p>I did a search and quickly found the culprit. Snow Leopard installs with the 64bit version of the Java 6 JVM but GWT only runs with 32bit version of Java 5 JVM (as of now).</p>
<p>The good news is that until Google fixes the issue you can downgrade to the 32bit version of the Java 5 JVM. <a href="http://wiki.oneswarm.org/index.php/OS_X_10.6_Snow_Leopard" target="_blank">Here are the instructions</a>. Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jeffdouglas.com/2009/09/01/snow-leopard-breaks-google-web-toolkit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GWT Portlets</title>
		<link>http://blog.jeffdouglas.com/2009/08/21/gwt-portlets/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=gwt-portlets</link>
		<comments>http://blog.jeffdouglas.com/2009/08/21/gwt-portlets/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 08:58:38 +0000</pubDate>
		<dc:creator>Jeff Douglas</dc:creator>
				<category><![CDATA[GWT]]></category>

		<guid isPermaLink="false">http://blog.jeffdouglas.com/?p=1133</guid>
		<description><![CDATA[GWT Portlets is a free open source web framework for building GWT applications. It defines a very simple &#38; productive programming model to build good looking, modular GWT applications. The programming model is somewhat similar to writing JSR168 portlets for a portal server (Liferay, JBoss Portal etc.). The &#8220;portal&#8221; is your application built using the [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.jeffdouglas.com%2F2009%2F08%2F21%2Fgwt-portlets%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.jeffdouglas.com%2F2009%2F08%2F21%2Fgwt-portlets%2F&amp;source=jeffdonthemic&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>GWT Portlets is a free open source web framework for building GWT applications. It defines a very simple &amp; productive programming model to build good looking, modular GWT applications.</p>
<p>The programming model is somewhat similar to writing JSR168 portlets for a portal server (Liferay, JBoss Portal etc.). The &#8220;portal&#8221; is your application built using the GWT Portlets framework as a library. Application functionality is developed as loosely coupled Portlets each with an optional server side DataProvider.</p>
<p>Project: <a href="http://code.google.com/p/gwtportlets/" target="_blank">http://code.google.com/p/gwtportlets/</a></p>
<p>Demo: <a href="http://095-beta.latest.gwtportletdemo.appspot.com/" target="_blank">http://095-beta.latest.gwtportletdemo.appspot.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jeffdouglas.com/2009/08/21/gwt-portlets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GWT 2.0 Ui Binder First Look</title>
		<link>http://blog.jeffdouglas.com/2009/08/12/gwt-2-0-ui-binder-first-look/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=gwt-2-0-ui-binder-first-look</link>
		<comments>http://blog.jeffdouglas.com/2009/08/12/gwt-2-0-ui-binder-first-look/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 10:25:27 +0000</pubDate>
		<dc:creator>Jeff Douglas</dc:creator>
				<category><![CDATA[GWT]]></category>
		<category><![CDATA[Google App Engine]]></category>

		<guid isPermaLink="false">http://blog.jeffdouglas.com/?p=1096</guid>
		<description><![CDATA[I caught this off of Iein Valdez&#8217;s Twitter feed yesterday: Adrien Ancelin: &#8221;For all the GWT-Enthusiasts around here, the official GWT repository now includes a preview version of a very promising 2.0 feature : Ui Binder. I wrote a very simple yet efficient example of UiBinder in action and uploaded a 2.0 build, a little login [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.jeffdouglas.com%2F2009%2F08%2F12%2Fgwt-2-0-ui-binder-first-look%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.jeffdouglas.com%2F2009%2F08%2F12%2Fgwt-2-0-ui-binder-first-look%2F&amp;source=jeffdonthemic&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I caught this off of <a href="http://twitter.com/iein/status/3250605661" target="_blank">Iein Valdez&#8217;s Twitter feed</a> yesterday:</p>
<blockquote><p>Adrien Ancelin: &#8221;For all the GWT-Enthusiasts around here, the official GWT repository now includes a preview version of a very promising 2.0 feature : Ui Binder. I wrote a very simple yet efficient example of UiBinder in action and uploaded a 2.0 build, a little login form example and a small article about it.&#8221;</p></blockquote>
<p><a href="http://blog.jeffdouglas.com/wp-content/uploads/2009/08/uibinder.png" rel="lightbox[1096]"><img class="alignnone size-full wp-image-1097" title="uibinder" src="http://blog.jeffdouglas.com/wp-content/uploads/2009/08/uibinder.png" alt="uibinder" width="529" height="294" /></a></p>
<p>Apparently it&#8217;s a declarative way to lay out GWT applications using one or more XML files instead of programmatically. This should make my life <strong>much</strong> easier!</p>
<p>Here&#8217;s <a href="http://code.google.com/p/sfeir/wiki/UIBinderEN" target="_blank">more info</a> about the Ui Binder example.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jeffdouglas.com/2009/08/12/gwt-2-0-ui-binder-first-look/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Need Input for Demo App using GWT and GAE/J</title>
		<link>http://blog.jeffdouglas.com/2009/07/27/need-input-for-demo-app-using-gwt-and-gaej/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=need-input-for-demo-app-using-gwt-and-gaej</link>
		<comments>http://blog.jeffdouglas.com/2009/07/27/need-input-for-demo-app-using-gwt-and-gaej/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 19:34:42 +0000</pubDate>
		<dc:creator>Jeff Douglas</dc:creator>
				<category><![CDATA[GAE/J]]></category>
		<category><![CDATA[GWT]]></category>
		<category><![CDATA[Google App Engine]]></category>

		<guid isPermaLink="false">http://blog.jeffdouglas.com/?p=1058</guid>
		<description><![CDATA[A couple of the guys and myself at Appirio are writing a beginning Google App Engine with Java book to be released this fall. We&#8217;ve locked down the functionality of the app we are going to be discussing in the book but I would like to put the app out to everyone and get any [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.jeffdouglas.com%2F2009%2F07%2F27%2Fneed-input-for-demo-app-using-gwt-and-gaej%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.jeffdouglas.com%2F2009%2F07%2F27%2Fneed-input-for-demo-app-using-gwt-and-gaej%2F&amp;source=jeffdonthemic&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>A couple of the guys and myself at Appirio are writing a beginning Google App Engine with Java book to be released this fall. We&#8217;ve locked down the functionality of the app we are going to be discussing in the book but I would like to put the app out to everyone and get any feedback regarding the user interaction.</p>
<p><strong>You can run the application at: </strong><a href="http://book-timeentry.appspot.com/" target="_blank"><strong>http://book-timeentry.appspot.com</strong></a></p>
<p><a href="http://book-timeentry.appspot.com/"><img title="timecard-app" src="http://blog.jeffdouglas.com/wp-content/uploads/2009/07/timecard-app.png" alt="timecard-app" width="544" height="235" /></a></p>
<p>The use case is fairly simple. This is a time card application where users login with their Google credentials and enter time against a project and milestone. The user&#8217;s time is persisted to BigTable and can be viewed by selecting the &#8220;Current Entries&#8221; tab.</p>
<p>Please let me know if you have any issues, recommendation or general feedback on functionality. This is a beginners level book so the app won&#8217;t go into too much depth. Any feedback would be greatly appreciated.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jeffdouglas.com/2009/07/27/need-input-for-demo-app-using-gwt-and-gaej/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

