<?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>clonker.de</title>
	<atom:link href="http://clonker.de/feed/" rel="self" type="application/rss+xml" />
	<link>http://clonker.de</link>
	<description>everything but yet nothing</description>
	<lastBuildDate>Wed, 01 Feb 2012 12:16:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Random pictures</title>
		<link>http://clonker.de/random-pictures/</link>
		<comments>http://clonker.de/random-pictures/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 12:15:28 +0000</pubDate>
		<dc:creator>clonker</dc:creator>
				<category><![CDATA[misc]]></category>

		<guid isPermaLink="false">http://clonker.de/?p=29</guid>
		<description><![CDATA[And here we go out of the desperate try not to think about the study-work being ahead of me:]]></description>
			<content:encoded><![CDATA[<p>And here we go out of the desperate try not to think about the study-work being ahead of me:<br />
<center><br />
<div id="attachment_33" class="wp-caption alignnone" style="width: 310px"><a href="http://clonker.de/wp-content/uploads/2012/02/turtle-strawberry.jpg"><img src="http://clonker.de/wp-content/uploads/2012/02/turtle-strawberry-300x199.jpg" alt="" title="turtle-strawberry" width="300" height="199" class="alignnone size-medium wp-image-33" /></a><p class="wp-caption-text">Turtle-Strawberry</p></div><br/><br />
<div id="attachment_32" class="wp-caption alignnone" style="width: 310px"><a href="http://clonker.de/wp-content/uploads/2012/02/huming.jpg"><img src="http://clonker.de/wp-content/uploads/2012/02/huming-252x300.jpg" alt="" title="huming" width="252" height="300" class="alignnone size-medium wp-image-32" /></a><p class="wp-caption-text">Huming</p></div><br/><br />
<div id="attachment_31" class="wp-caption alignnone" style="width: 310px"><a href="http://clonker.de/wp-content/uploads/2012/02/fencing.png"><img src="http://clonker.de/wp-content/uploads/2012/02/fencing-300x178.png" alt="" title="fencing" width="300" height="178" class="alignnone size-medium wp-image-31" /></a><p class="wp-caption-text">Fencing</p></div><br/><br />
<div id="attachment_30" class="wp-caption alignnone" style="width: 310px"><a href="http://clonker.de/wp-content/uploads/2012/02/bat-park.png"><img src="http://clonker.de/wp-content/uploads/2012/02/bat-park-300x222.png" alt="" title="bat-park" width="300" height="222" class="alignnone size-medium wp-image-30" /></a><p class="wp-caption-text">Bat-Park</p></div></center></p>
]]></content:encoded>
			<wfw:commentRss>http://clonker.de/random-pictures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cookscrap for a JNLP with JNI components</title>
		<link>http://clonker.de/cookscrap-for-a-jnlp-with-jni-components/</link>
		<comments>http://clonker.de/cookscrap-for-a-jnlp-with-jni-components/#comments</comments>
		<pubDate>Thu, 01 Sep 2011 12:28:55 +0000</pubDate>
		<dc:creator>clonker</dc:creator>
				<category><![CDATA[informatics]]></category>

		<guid isPermaLink="false">http://clonker.de/?p=21</guid>
		<description><![CDATA[Writing a JNLP with native components is fairly easy. First of all you have to know that each JNLP uses (per default) sandboxing. Which means that no external resouces that you'd normally access via "System.load( ... )" are available. There indeed are options to disable this sandboxing, but I personally do not think that this [...]]]></description>
			<content:encoded><![CDATA[<p>Writing a JNLP with native components is fairly easy.<br />
First of all you have to know that each JNLP uses (per default) sandboxing. Which means that no external resouces that you'd normally access via "System.load( ... )" are available. There indeed are options to disable this sandboxing, but I personally do not think that this is as intended by the inventor.<br />
Anyhow there is the possibility to hand in native libraries.<br />
To reach that goal, all you need to do is wrap all your native components into single JAR (which is now platform dependant, so you'll probably need more than just one jar), sign it and reference it in your JNLP. This is done by the tag &lt;nativelib href="lib/windows/corelib.jar"/&gt;.</p>
<p>Usually you'd like to wrap this in a resource element specifying the needed environment. Just like:</p>
<p><tt>    &lt;<strong>resources os</strong>="Windows"&gt;</tt><br />
<tt>        &lt;<strong>nativelib href</strong>="corelibs.jar"/&gt;</tt><br />
<tt>    &lt;/<strong>resource</strong>&gt;</tt></p>
<p>Now what happens under the hood? Instead of using java.lang.path (which is equal to PATH in windows or equal mechanisms under different operating systems), it'll create a folder in the application cache which is also made accessible. Like that you can naturally use all your native libs just like you are used to (if you are used to it at all) ;).</p>
]]></content:encoded>
			<wfw:commentRss>http://clonker.de/cookscrap-for-a-jnlp-with-jni-components/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Where to find jnlp.jar</title>
		<link>http://clonker.de/where-to-find-jnlp-jar/</link>
		<comments>http://clonker.de/where-to-find-jnlp-jar/#comments</comments>
		<pubDate>Mon, 22 Aug 2011 15:12:13 +0000</pubDate>
		<dc:creator>clonker</dc:creator>
				<category><![CDATA[informatics]]></category>

		<guid isPermaLink="false">http://clonker.de/?p=18</guid>
		<description><![CDATA[If anyone is searching it like i did, it's now located under /sample/jnlp/servlet/jnlp.jar in your JDK home directory.]]></description>
			<content:encoded><![CDATA[<p>If anyone is searching it like i did, it's now located under <code>/sample/jnlp/servlet/jnlp.jar</code> in your JDK home directory.</p>
]]></content:encoded>
			<wfw:commentRss>http://clonker.de/where-to-find-jnlp-jar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GWT serialization and cell widgets</title>
		<link>http://clonker.de/gwt-serialization-and-cell-widgets/</link>
		<comments>http://clonker.de/gwt-serialization-and-cell-widgets/#comments</comments>
		<pubDate>Sun, 21 Aug 2011 14:45:41 +0000</pubDate>
		<dc:creator>clonker</dc:creator>
				<category><![CDATA[informatics]]></category>

		<guid isPermaLink="false">http://clonker.de/?p=7</guid>
		<description><![CDATA[Lately I've been busy with writing some GWT-app based on a content management system. In order to display data, it would be best to use Cell-Widgets. If content gets changed in the browser, somewhere a button-widget is added and one can update it with some RPC call. So far so good. Let's look at this [...]]]></description>
			<content:encoded><![CDATA[<p>Lately I've been busy with writing some GWT-app based on a content management system. In order to display data, it would be best to use Cell-Widgets. If content gets changed in the browser, somewhere a button-widget is added and one can update it with some RPC call. So far so good. Let's look at this small sample:</p>
<pre class="prettyprint ">
public class Contact implements IsSerializable{
	private String	name;
	public Contact(){} // default constructor for serialization
	public Contact(String name){
		this.name = name;
	}
}
</pre>
<p>As our data objects and somewhere else in the client code:</p>
<pre class="prettyprint ">
CellList&lt;Contact&gt; cellList = new CellList&lt;Contact&gt;(new AbstractCell&lt;Contact&gt;() {
	@Override
	public void render(Cell.Context context, Contact value, SafeHtmlBuilder sb){
		sb.appendHtmlConstant(&quot;&lt;b&gt;&quot; + value.name + &quot;&lt;/b&gt;&quot;);
	}
});
</pre>
<p>Now our cellList gets populated with data, no matter in which kind (either directly, or with some kind of data provider).<br />
If we want to gather our data back out of the cell widget, we usually call:</p>
<pre class="prettyprint ">
List&lt;Contact&gt; ourData = cellList.getVisibleItems();
</pre>
<p>No problem yet. But now the data is useless as long as it stays in the client. We need to get it back to the server. How do we do that? Correct: RPC.<br />
This is where the problems begin - if we execute the call it will fail with a serialization exception.</p>
<p>How could this happen? We did everything correctly: Contact implements IsSerializable (the marker interface for gwt-serialization), it even has the required default constructor. So this can't be the problem.<br />
If we have a closer look, we see that cellList returns a list of contacts (of course it does, since it contains more than one contact.. deuh). Lists are serializable, usually. LinkedList, ArrayList - everything we could guess of.<br />
But internally, CellWidgets return their data via</p>
<pre class="prettyprint ">
public List&lt;T&gt; getRowDataValues() {
      return Collections.unmodifiableList(rowData);
}
</pre>
<p>which is NOT serializable. So this is where we have to look for a solution.<br />
My simple approach that actually works: Wrap the returned list into a new (serializable) list, which will cause the internal data-structure to be overwritten. Sample:</p>
<pre class="prettyprint ">
List&lt;Contact&gt; ourData = new LinkedList&lt;Contact&gt;(cellList.getVisibleItems());
</pre>
<p>In a nutshell: Never send the data of cell widgets back to the server directly, as the internally used structures are not serializable.<br />
Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://clonker.de/gwt-serialization-and-cell-widgets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

