<?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>Misterdom's World &#187; Google Web Toolkit (GWT)</title>
	<atom:link href="http://www.guinard.org/~misterdom/category/loogbook/google-web-toolkit-gwt/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.guinard.org/~misterdom</link>
	<description>My Computing Logbook</description>
	<lastBuildDate>Sat, 24 Dec 2011 09:31:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Doing PUT DELETE and Other Niceties with GWT</title>
		<link>http://www.guinard.org/~misterdom/2009/10/01/doing-put-with-gwt/</link>
		<comments>http://www.guinard.org/~misterdom/2009/10/01/doing-put-with-gwt/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 15:33:35 +0000</pubDate>
		<dc:creator>misterdom</dc:creator>
				<category><![CDATA[Google Web Toolkit (GWT)]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[gwt]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[POST]]></category>
		<category><![CDATA[PUT]]></category>
		<category><![CDATA[verbs]]></category>

		<guid isPermaLink="false">http://www.guinard.org/~misterdom/?p=112</guid>
		<description><![CDATA[You probably are REST lovers like I personally am.
Thus you were probably quite frustrated when seeing that a GWT (Google Web Toolkit) client cannot send other requests than POST or GET.
Well here is the solution:
public class RequestBuilderForAnyHTTPMethodTypeExample extends RequestBuilder {
  /**
   * Constructor that allows a developer to override the HTTP method
 [...]]]></description>
			<content:encoded><![CDATA[<p>You probably are REST lovers like I <a href="http://www.webofthings.com/tag/rest/">personally am</a>.</p>
<p>Thus you were probably quite frustrated when seeing that a GWT (Google Web Toolkit) client cannot send other requests than POST or GET.<br />
Well here is the solution:</p>
<p><code>public class RequestBuilderForAnyHTTPMethodTypeExample extends RequestBuilder {</p>
<p>  /**<br />
   * Constructor that allows a developer to override the HTTP method<br />
   * restrictions imposed by the RequestBuilder class.  Note if you override the<br />
   * RequestBuilder's HTTP method restrictions in this manner, your application<br />
   * may not work correctly on Safari browsers.<br />
   *<br />
   * @param httpMethod any non-null, non-empty string is considered valid<br />
   * @param url any non-null, non-empty string is considered valid<br />
   *<br />
   * @throws IllegalArgumentException if httpMethod or url are empty<br />
   * @throws NullPointerException if httpMethod or url are null<br />
   */<br />
  public RequestBuilderForAnyHTTPMethodTypeExample(String httpMethod, String url) {<br />
    super(httpMethod, url);<br />
  }<br />
</code></p>
<p>i.e. simply subclass the <code>RequestBuilder</code></p>
<p>Source: <a href="http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/http/client/package-summary.html"> (see the bottom of the page).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guinard.org/~misterdom/2009/10/01/doing-put-with-gwt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JSON and the Quoted Strings</title>
		<link>http://www.guinard.org/~misterdom/2009/09/16/json-and-the-quoted-strings/</link>
		<comments>http://www.guinard.org/~misterdom/2009/09/16/json-and-the-quoted-strings/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 16:50:38 +0000</pubDate>
		<dc:creator>misterdom</dc:creator>
				<category><![CDATA[Dev Logbook]]></category>
		<category><![CDATA[Google Web Toolkit (GWT)]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[gwt]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[REST]]></category>

		<guid isPermaLink="false">http://www.guinard.org/~misterdom/?p=103</guid>
		<description><![CDATA[&#8220;Bug&#8221; number two for today is a little more tricky.
I was retrieving a JSON object in the GWT (Google Web Toolkit) and putting its Java representation in a HashMap. The only problem is that I could never find it again by referring to its key which I also extracted from JSON object. Here is why:

currentCons.get("URI").isString().toString()

Is [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;Bug&#8221; number two for today is a little more tricky.</p>
<p>I was retrieving a JSON object in the <a href="../../../../category/loogbook/google-web-toolkit-gwt/">GWT (Google Web Toolkit)</a> and putting its Java representation in a <code>HashMap</code>. The only problem is that I could never find it again by referring to its key which I also extracted from JSON object. Here is why:</p>
<blockquote><p>
<code>currentCons.get("URI").isString().toString()</code>
</p></blockquote>
<p>Is actually not returning the String representation of a JSONString object but the quoted representation of that String: e.g. &#8220;key&#8221; and not key. It was in the API but it took me a while to figure it out&#8230;</p>
<p>The solution is:</p>
<blockquote><p>
<code>currentCons.get("URI").isString().stringValue();</code>
</p></blockquote>
<p>Which gets what I wanted, i.e. the String representation without the quotes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guinard.org/~misterdom/2009/09/16/json-and-the-quoted-strings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Porting a Google Web Toolkit Netbeans Project (GWT4NB) to the Latest GWT and GWT4NB</title>
		<link>http://www.guinard.org/~misterdom/2009/09/01/porting-gwt-nb/</link>
		<comments>http://www.guinard.org/~misterdom/2009/09/01/porting-gwt-nb/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 10:09:47 +0000</pubDate>
		<dc:creator>misterdom</dc:creator>
				<category><![CDATA[Google Web Toolkit (GWT)]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Netbeans]]></category>

		<guid isPermaLink="false">http://www.guinard.org/~misterdom/?p=93</guid>
		<description><![CDATA[A while ago I was blogging about some experiences with the Google Web Toolkit (GWT) and Netbeans.
I reported on the existence of a great plugin (GWT4NB) that GWT-enables your Netbeans (starting from NB 6.5).
Well today I upgraded to NB 6.7 (from 6.5), to GWT4NB 2.6 (from 2.0.4) and to GWT 1.7 (from 1.5.3) and could [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago I was blogging about some experiences with the Google Web Toolkit (GWT) and Netbeans.<br />
I reported on the existence of a great plugin (<a href="http://gwt4nb.dev.java.net/">GWT4NB</a>) that GWT-enables your Netbeans (starting from NB 6.5).<br />
Well today I upgraded to NB 6.7 (from 6.5), to GWT4NB 2.6 (from 2.0.4) and to GWT 1.7 (from 1.5.3) and could not compile my GWT project anymore. Here are the steps I went through to make it run again:</p>
<ol>
<li>Create an new empty Web project. When Netbeans asks you what framework you&#8217;d like to use (last sept of the wizard) select the Google Web Toolkit.</li>
<li>Be sure that the GWT Installation Folder points to the latest version of GWT (1.7 in my case).</li>
<li>Copy the content of both: <code>build-gwt.xml</code> and <code>gwt.properties</code> to these files in your old project.</li>
<li>Make sure you keep the entry <code>gwt.module=...</code> of your old project.</li>
<li>You might need to check the properties of the old project and make sure the &#8220;Frameworks&#8221; entry is referencing the latest version of GWT. </li>
</ol>
<p>This should do, you should now be able to run and compile the old project with the latest GWT and GWT4NB plugin (at least it worked for me!).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guinard.org/~misterdom/2009/09/01/porting-gwt-nb/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Creating a Automated Kiosk with Firefox and GWT on Windows XP</title>
		<link>http://www.guinard.org/~misterdom/2008/11/26/creating-a-kiosk/</link>
		<comments>http://www.guinard.org/~misterdom/2008/11/26/creating-a-kiosk/#comments</comments>
		<pubDate>Wed, 26 Nov 2008 09:26:06 +0000</pubDate>
		<dc:creator>misterdom</dc:creator>
				<category><![CDATA[Google Web Toolkit (GWT)]]></category>
		<category><![CDATA[Plogg and Smart Meters]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.guinard.org/~misterdom/?p=50</guid>
		<description><![CDATA[My task for today was to create a kiosk application. In particular this application is meant to monitor the energy consumption of common appliances in an office. For that matter it uses the Ploggs sensor nodes and a Google Web Toolkit Application.
Now, the setting is such that the GWT application has to be displayed on [...]]]></description>
			<content:encoded><![CDATA[<p>My task for today was to create a kiosk application. In particular this application is meant to monitor the energy consumption of common appliances in an office. For that matter it uses the <a href="?cat=4">Ploggs sensor nodes</a> and a <a href="?cat=20">Google Web Toolkit Application</a>.</p>
<p>Now, the setting is such that the GWT application has to be displayed on a screen of a computer dedicated to that application. The monitoring app has to be running the whole day in full-screen mode without anybody doing anything with the browser but see and surf on the page(s) you selected. </p>
<p>This is what&#8217;s commonly called a kiosk application. Now, here are the steps I went through to setup the kiosk, note that the computer runs Windows XP Pro SP 3:</p>
<p>1) Install Firefox and download the <a href="https://addons.mozilla.org/en-US/firefox/addon/1659">R-Kiosk plugin</a>. This guy starts Firefox in fullscreen mode and does not allow the user to use/display any menu. Note that after installing this plugin you won&#8217;t be able to use Firefox normally unless you start it in Safe Mode (Mozilla Firefox (Safe Mode) in your start menu).<br />
More info on that matter on: <a href="http://samanathon.com/firefox-2s-kiosk-mode/">http://samanathon.com/firefox-2s-kiosk-mode/</a> and <a href="http://davidstoker.org/blog/tag/r-kiosk/">http://davidstoker.org/blog/tag/r-kiosk/</a></p>
<p>2) Schedule Windows to start Firefox and everything else you need on startup:<br />
<a href="http://support.microsoft.com/kb/308569">http://support.microsoft.com/kb/308569</a><br />
If, just like me, you keep getting the: “0&#215;80070005: Access is denied&#8221; error message when trying to schedule a task then try the option &#8220;Run only if logged in&#8221; and schedule the task to start &#8220;At Logon&#8221;.<br />
Note that if you want everything to start auto-magically, without user involvement, you should not set a user password. </p>
<p>3) For this kiosk we want everything to be automated which means we need two more scheduled tasks:</p>
<p>Shutdown: this is quite straightforward using the <code>shutdown</code> command (yeah, even Windows has got things like that!). Create a batch file containing the shutdown command:<br />
<code><br />
cd\<br />
shutdown -s -f -t 30<br />
</code><br />
Which says: shutdown this computer (-s), force all apps to close (-f) and do that in 30 seconds (-t)<br />
Now, all you need to do is to schedule that to happen everyday at, say, 8 o&#8217;clock (see <a href="http://samanathon.com/windows-tip-shutdown-your-computer-with-a-batch-file/">http://samanathon.com/windows-tip-shutdown-your-computer-with-a-batch-file</a>)<br />
More info on the shutdown command on: and <a href="and http://www.yinfor.com/blog/archives/2007/04/schedule_to_shutdown_your_wind.html ">http://www.yinfor.com/blog/archives/2007/04/schedule_to_shutdown_your_wind.html<br />
</a></p>
<p>Startup: now that&#8217;s a bit more tricky since we need to wake up a computer that&#8217;s &#8230; shutdown, i.e. no chance do it by scheduling a Windows task!<br />
The answer to that is: BIOS. Well at least most BIOS offer a wake-on-schedule functionality. In our case the BIOS of the Intel Desktop Board D945GCLF offers it. All I had to do was to hit F2 at startup (i.e. access the BIOS) and enable the &#8220;Wake on Alarm&#8221; option to 8 o&#8217;clock in the morning which did the trick&#8230;</p>
<p>4) Last but not least (this is an edit since I noticed that this morning when the kiosk screen turned black!): you need to be sure that the PC does not turn off the screen after a while. The best-thing to do is to activate the Presentation mode in Control Panel -> Power Options -> Power Scheme and select Presentation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guinard.org/~misterdom/2008/11/26/creating-a-kiosk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Netbeans and the GWT: GWT4NB module</title>
		<link>http://www.guinard.org/~misterdom/2008/11/03/netbeans-and-the-gwt-gwt4nb-module/</link>
		<comments>http://www.guinard.org/~misterdom/2008/11/03/netbeans-and-the-gwt-gwt4nb-module/#comments</comments>
		<pubDate>Mon, 03 Nov 2008 17:08:02 +0000</pubDate>
		<dc:creator>misterdom</dc:creator>
				<category><![CDATA[Dev Logbook]]></category>
		<category><![CDATA[Google Web Toolkit (GWT)]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Netbeans]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[gwt]]></category>

		<guid isPermaLink="false">http://www.guinard.org/~misterdom/?p=35</guid>
		<description><![CDATA[A few days ago I started experimenting with the Google Web Toolkit module for the Netbeans IDE  a rather nice module that lets you develop GWT code directly in your (at least mine!) very favorite IDE. The biggest benefit is free code completion and tagets for building and debugging your application.
A few remarks thought, [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago I started experimenting with the <a href="https://gwt4nb.dev.java.net/">Google Web Toolkit module for the Netbeans IDE </a> a rather nice module that lets you develop GWT code directly in your (at least mine!) very favorite IDE. The biggest benefit is free code completion and tagets for building and debugging your application.</p>
<p>A few remarks thought, when trying to integrate the awesome <a href="http://code.google.com/p/ofcgwt/">OFCGWT chart library</a> in my application I had to face two problems.</p>
<p>First of all the <a href="http://www.netbeans.org/kb/60/web/quickstart-webapps-gwt.html">GWT4NB tutorial </a>on Netbeans.org says you should use the 1.4 java compiler because the GWT does not support Java EE 1.5. Well I&#8217;m pretty sure the GWT does not offer support for EJBs and the like (because it has nothing to do with the backend, it&#8217;s a UI toolkit!) but it does support Java SE 6 constructs. Thus, if you do select Java EE 1.4 when first creating your project be sure to then change the source/binary version to 1.6 in the project properties.</p>
<p>As an example I could not compile the OFCGWT example without it.</p>
<p>The next thing to be aware of is that the GWT4NB module does not fully comply with the URL assigned to your application by the GWT, when a typical application URL would look like (in GWT):</p>
<p><a rel="nofollow" href="http://localhost:8080/UWTest/org.test.Main" target="_blank">http://localhost:8080/UWTest/org.test.Main</a></p>
<p>Netbeans with the GWT4NB plugin exposes it as:</p>
<p><a rel="nofollow" href="http://localhost:8080/UWTest/" target="_blank">http://localhost:8080/UWTest/</a></p>
<p>That basically means the entry point .html file is not located in org.test.Main in the GWT4NB version but rather directly at the root context of your app.</p>
<p>A consequence of this is that GWT modules assuming that the compiled javascript will be loaded by a page at org.test.Main will look for files in the wrong place. Namely, in the case of OFCGWT, the .js references .swf files which it expects to be located in the same folder as where it has been loaded from.</p>
<p>Anyway, I found two workarounds for that matter:</p>
<p>1:</p>
<p>We need to override the post-compile target in our build.xml which is guaranteed<br />
never to be re-generated by the IDE:<br />
<code><br />
&lt;target name="-post-compile"&gt;<br />
&lt;property name="gwt.compiler.output.style" value="OBFUSCATED"/&gt;<br />
&lt;property name="gwt.compiler.logLevel" value="WARN"/&gt;<br />
&lt;java classpath="${javac.classpath}:${src.dir}"<br />
failonerror="true"<br />
classname="com.google.gwt.dev.GWTCompiler" fork="true"<br />
maxmemory="512m"&gt;<br />
&lt;arg value="-out"/&gt;<br />
&lt;arg path="${build.web.dir}/"/&gt;<br />
&lt;arg value="-style"/&gt;<br />
&lt;arg value="${gwt.compiler.output.style}"/&gt;<br />
&lt;arg value="-logLevel"/&gt;<br />
&lt;arg value="${gwt.compiler.logLevel}"/&gt;<br />
&lt;arg value="${gwt.module}"/&gt;<br />
&lt;/java&gt;<br />
&lt;property name="gwt.output.dir" value="${gwt.module}"/&gt;<br />
&lt;move todir="${build.web.dir}/${gwt.output.dir}"&gt;<br />
&lt;fileset dir="${build.web.dir}/${gwt.module}"/&gt;<br />
&lt;fileset dir="${build.web.dir}"&gt;<br />
&lt;include name="**/*.html"/&gt;<br />
&lt;include name="**/*.css"/&gt;<br />
&lt;/fileset&gt;<br />
&lt;/move&gt;<br />
&lt;/target&gt;</code></p>
<p>This will actually move all the .css and .html files of your web folder to the correct output dir. You then need to be sure that the correct .js file is loaded in your welcomeGWT.html file. That is: you need to remove the org.test.Main/ part.</p>
<p>When deploying Apache might not really be happy anymore since there is no html file at the root of your application anymore however, you just need to call it explicitely like:<br />
<a rel="nofollow" href="http://localhost:8080/UWTest/org.test.Main/welcomeGWT.html" target="_blank">http://localhost:8080/UWTest/org.test.Main/welcomeGWT.html</a> and that<br />
should do the trick! BUT &#8211;&gt;</p>
<p>2:</p>
<p>BUT, that said, there is a much simpler way of getting rid of that problem: In gwt.properties change the line gwt.output.dir to gwt.output.dir=/<br />
This will deploy the GWT files (all of them, including the .html and the ofcgwt .swf files) at the root <a rel="nofollow" href="http://localhost:8080/UWTest/" target="_blank">http://localhost:8080/UWTest/</a> which then means that the .js, .swf and .html files are all located in the same folder and thus all on the same path.</p>
<p>This will actually move all the .css and .html files of your web folder to the correct output dir. You then need to be sure that the correct .js file is loaded in your welcomeGWT.html file. That is: you need to remove the org.test.Main/ part.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guinard.org/~misterdom/2008/11/03/netbeans-and-the-gwt-gwt4nb-module/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

