<?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>dogan kaya berktas &#187; Google Web Toolkit</title>
	<atom:link href="http://doganberktas.com/tag/google-web-toolkit/feed/" rel="self" type="application/rss+xml" />
	<link>http://doganberktas.com</link>
	<description>is actually from a small planet somewhere in the vicinity of Betelgeuse</description>
	<lastBuildDate>Thu, 26 Jan 2012 00:29:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Upgrading Grails, GWT, grails-gwt plugin and beyond</title>
		<link>http://doganberktas.com/2010/04/12/upgrading-grails-gwt-grails-gwt-plugin-and-beyond/</link>
		<comments>http://doganberktas.com/2010/04/12/upgrading-grails-gwt-grails-gwt-plugin-and-beyond/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 08:45:32 +0000</pubDate>
		<dc:creator>dkberktas</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[Grails]]></category>
		<category><![CDATA[gwt]]></category>
		<category><![CDATA[remotespots]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[Google Web Toolkit]]></category>
		<category><![CDATA[grails 1.2.2]]></category>
		<category><![CDATA[grails-gwt plugin]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Web application frameworks]]></category>
		<category><![CDATA[Windows XP]]></category>

		<guid isPermaLink="false">http://doganberktas.com/?p=246</guid>
		<description><![CDATA[@Remotespots project was started a couple of months ago and and after some time all the technologies were updated to their current versions (Grails 1.2.2, GWT 2.0 which is a huge change from 1.7, and finally grails-gwt 0.5). Since we were busy w/ the features we ignored the upgrade but time has come to sent [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a title="Colegiata de Santa Cruz, Castañeda, Cantabria" href="http://flickr.com/photos/40418474@N00/2602703212"><img class="aligncenter" src="http://farm4.static.flickr.com/3116/2602703212_1eb2830ea3.jpg" alt="" /></a></p>
<p>@<a href="http://remotespots.com">Remotespots</a> project was started a couple of months ago and and after some time all the technologies were updated to their current versions (Grails 1.2.2, GWT 2.0 which is a huge change from 1.7, and finally grails-gwt 0.5). Since we were busy w/ the features we ignored the upgrade but time has come to sent Remotespots to the wild, and we want it to be ready to its limits. Below you can find the steps and obstacles we encountered during the upgrade process. (I switched to Ubuntu from Windows XP, my headphones are still not working but at least I can open Eclipse under 60 seconds! so the things below is tested on Ubuntu 9.04)</p>
<ul>
<li>Download and change GRAILS_HOME to new grails version (1.2.2)</li>
<li>Run grails upgrade</li>
<li>Run install-plugin gwt  (so that it installs 0.5)</li>
<li>First obstacle</li>
<pre>Error executing script CompileGwtModules: No such  property: usingGoogleGin  for class: _Events
gant.TargetMissingPropertyException: No such property: usingGoogleGin for class: _Events
        at gant.Gant$_dispatch_closure4.doCall(Gant.groovy:329)
        at gant.Gant$_dispatch_closure6.doCall(Gant.groovy:334)
        at gant.Gant$_dispatch_closure6.doCall(Gant.groovy)
        at gant.Gant.withBuildListeners(Gant.groovy:344)
        at gant.Gant.this$2$withBuildListeners(Gant.groovy)
        at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
        at gant.Gant.dispatch(Gant.groovy:334)
        at gant.Gant.this$2$dispatch(Gant.groovy)
        at gant.Gant.invokeMethod(Gant.groovy)
        at gant.Gant.processTargets(Gant.groovy:495)
        at gant.Gant.processTargets(Gant.groovy:480)</pre>
<p>To solve it, run grails clean command and empty ~\.grails\1.2.2\scriptCache  folder. I found this solution from this <a href="http://n4.nabble.com/Compile-GWT-Modules-Failing-td1579454.html">link</a>.</p>
<li>Another problem you are likely to see is
<pre>grails  GWT module ... may need to be (re)compiled</pre>
<p>To solve it, run grails compile-gwt-modules command and refresh firefox w/ ctrl+f5 OR alt+shift+r</li>
<li>Last thing to be careful is, after started the gwt client with the command <strong>grails run-gwt-client</strong>, since GWT 2.0 get rid of hosted mode (finally), to see the changes on your code w/out restarting the server,  add the suffix to the url <strong>?gwt.codesvr=127.0.0.1:9997</strong>, from this <a href="http://groups.google.com/group/grails-gwt/browse_thread/thread/d27432c32f26dad4">link</a>, you can find the solutions to the problems people have w/ the grails-gwt plugin.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://doganberktas.com/2010/04/12/upgrading-grails-gwt-grails-gwt-plugin-and-beyond/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GWT &#8212; Calling a Java Method from Handwritten JavaScript</title>
		<link>http://doganberktas.com/2010/04/02/gwt-calling-a-java-method-from-handwritten-javascript/</link>
		<comments>http://doganberktas.com/2010/04/02/gwt-calling-a-java-method-from-handwritten-javascript/#comments</comments>
		<pubDate>Fri, 02 Apr 2010 00:12:55 +0000</pubDate>
		<dc:creator>dkberktas</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[gwt]]></category>
		<category><![CDATA[remotespots]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[Google Web Toolkit]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JavaScript programming language]]></category>
		<category><![CDATA[JSNi]]></category>

		<guid isPermaLink="false">http://doganberktas.com/?p=236</guid>
		<description><![CDATA[For the remotespots project, we developed a notification panel which is very similiar to Stackoverflow notification bar. So, what this bar provides is the a HTML message and a close bottom at the right end. For the close button, instead of adding a hyperlink from the java code, this time we used JSNI which enables [...]]]></description>
			<content:encoded><![CDATA[<p>For the <a href="http://remotespots.com">remotespots</a> project, we developed a notification panel which is very similiar to Stackoverflow notification bar. So, what this bar provides is the a HTML message and a close bottom at the right end.</p>
<p>For the close button, instead of adding a hyperlink from the java code, this time we used JSNI which enables you to integrate JavaScript directly into your application.</p>
<p>We have a class called <em>GenericNotifcation </em>in the package <em>org.remote.dogan.client. </em>When a noticition bar is needed,</p>
<pre>public static void showNotification(String message, int seconds)
</pre>
<p>is called.To hide the bar the following method is called,</p>
<pre>public static void hideNotification()
</pre>
<p>So, to make the JSNI close method call from js, we need to call the hideNotification java method from js.</p>
<p>To do this, we add amethod to register hideNotification method a js method for the handwritten javascript</p>
<pre>public static native void exportStaticMethod() /*-{
$wnd.closeNotification =
	@org.remote.dogan.client.GenericNotifcation::hideNotification();
}-*/;
</pre>
<p>As a second step, we should call the method exportStaticMethod() to actually make the registration of the js method. We do this in showNotification method but for a generic case, onModuleLoad is good candidate.</p>
<pre>public static void showNotification(String message, int seconds)

{
<strong>GenericNotifcation.exportStaticMethod();</strong>
...
}
</pre>
<p>So as the last step, we add the js call in the html template like the following:<br />
<strong>&lt;a title=&#8221;close this notification&#8221; onclick=&#8217;closeNotification()&#8217; /&gt;x&lt;/a&gt;</strong></p>
<p>For further information, the documentation for GWT JSNI is <a href="http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsJSNI.html">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://doganberktas.com/2010/04/02/gwt-calling-a-java-method-from-handwritten-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Simple Chart for a GWT Application on GAE/J</title>
		<link>http://doganberktas.com/2009/12/19/a-simple-chart-for-a-gwt-application-on-gaej/</link>
		<comments>http://doganberktas.com/2009/12/19/a-simple-chart-for-a-gwt-application-on-gaej/#comments</comments>
		<pubDate>Sat, 19 Dec 2009 02:41:17 +0000</pubDate>
		<dc:creator>dkberktas</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[chart]]></category>
		<category><![CDATA[gchart]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google App Engine]]></category>
		<category><![CDATA[Google Inc.]]></category>
		<category><![CDATA[Google Web Toolkit]]></category>
		<category><![CDATA[gwt]]></category>
		<category><![CDATA[gwt 2.0]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Web development software]]></category>

		<guid isPermaLink="false">http://doganberktas.com/?p=147</guid>
		<description><![CDATA[I am trying charting solutions for a GWT project and gchart seems a nice one. After some digging I create a sample project which is hosted on Google App Engine (GAE) demo. Source code is at Google project The chart will show the remaining number of months in the current year. First download the jar [...]]]></description>
			<content:encoded><![CDATA[<p>I am trying charting solutions for a GWT project and gchart seems a nice one. After some digging I create a sample project which is hosted on Google App Engine (GAE) <a href="http://ghart-samples.appspot.com/">demo</a>. Source code is at <a href="https://dogansartifacts.googlecode.com/svn/trunk/GoogleAppEngineJava/GChart-samples">Google project</a></p>
<p>The chart will show the remaining number of months in the current year.</p>
<ul>
<li>First download the jar from the project home page http://code.google.com/p/gchart/</li>
<li>Put it under war/WEB-INF/lib and add the gchart.jar to your classpath</li>
<li>Create a  Web Application project called it GChart-samples (I assume you have Google Eclipse Plugin and follow the basic steps from <a href="http://code.google.com/eclipse/docs/getting_started.html">here</a>)</li>
<li>This step is for make-up, find GChart_samples.html under war/WEB-INF and clear the part between &lt;body&gt; tags.</li>
<li>Open GChart_samples.gwt.xml and add the following line
<pre>&lt;inherits name='com.googlecode.gchart.GChart'/&gt;</pre>
</li>
<li>Create a class in client folder called FirstChart and change it as the following
<pre>package com.dogan.kaya.client;

import com.googlecode.gchart.client.GChart;

public class FirstChart extends GChart
{
	public FirstChart()
	{
		setChartSize(350, 350);

		addCurve();

		int[] data = { 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 };
		for (int i = 0; i &lt; data.length; i++)
		{
			getCurve().addPoint(i + 1, data[i]);
		}
		//curve customization
		getCurve().getSymbol().setHeight(10);
		getCurve().getSymbol().setWidth(10);
		getCurve().getSymbol().setBorderColor("black");
		getCurve().getSymbol().setBorderWidth(3);
		getCurve().getSymbol().setSymbolType(SymbolType.LINE);
		getCurve().getSymbol().setFillThickness(2);
		getCurve().getSymbol().setFillSpacing(0);
		//chart customization
		getXAxis().setAxisMin(1);
		getXAxis().setAxisMax(12);
		getXAxis().setTickCount(12);
		getXAxis().setHasGridlines(false);
		getXAxis().setTickLocation(TickLocation.CENTERED);
		getXAxis().setTickLabelFontSize(10);
		getYAxis().setAxisMin(0);
		getYAxis().setAxisMax(12);
		//to get inteter values on y axis, be careful
		//about the number of intervals it can be tricky
		getYAxis().setTickCount(13);
		getYAxis().setTicksPerLabel(2);
		getYAxis().setHasGridlines(false);
		getYAxis().setTickLabelFontSize(10);
		//
		update();
	}
}</pre>
</li>
<li>Open GChart_samples class and change it like the following
<pre>package com.dogan.kaya.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;

public class GChart_samples implements EntryPoint
{
	public void onModuleLoad()
	{
		RootPanel.get().add(new FirstChart());
	}
}</pre>
</li>
<li>My output is sth like that</li>
</ul>
<p><a href="../wp-content/uploads/2009/12/chart1.jpg"></a><a href="http://doganberktas.com/wp-content/uploads/2009/12/chart11.jpg"><img class="alignnone size-full wp-image-154" title="chart1" src="http://doganberktas.com/wp-content/uploads/2009/12/chart11.jpg" alt="" width="361" height="199" /></a></p>
<p>ps:</p>
<p>some nice links about gchart are as follows:</p>
<ol>
<li style="text-align: justify;">gchart <a href="http://code.google.com/p/gchart/">homepage</a></li>
<li style="text-align: justify;">A simple tutorial at http://whatwouldnickdo.com/wordpress/264/simple-charts-in-gwt-with-gchart/</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://doganberktas.com/2009/12/19/a-simple-chart-for-a-gwt-application-on-gaej/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

