<?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>dev-eth0.de &#187; Tapestry</title>
	<atom:link href="http://www.dev-eth0.de/tag/tapestry/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dev-eth0.de</link>
	<description>Zu viele Lösungen für zu wenig Probleme...</description>
	<lastBuildDate>Tue, 24 Jan 2012 11:20:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Logging in a Tapestry-Service</title>
		<link>http://www.dev-eth0.de/logging-in-a-tapestry-service/</link>
		<comments>http://www.dev-eth0.de/logging-in-a-tapestry-service/#comments</comments>
		<pubDate>Sun, 04 Jul 2010 15:48:12 +0000</pubDate>
		<dc:creator>dev-eth0</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Tapestry]]></category>

		<guid isPermaLink="false">http://www.dev-eth0.de/?p=842</guid>
		<description><![CDATA[The usage of a Logging-Service in Tapestry is quite easy. You just have to use the @Inject Annotation in your classes.



A little bit more complicated is the usage in a Tapestry-Service. Here an @Inject Annotation will fail, so you would have to get an instance for your logger from another source. One possibility would ...]]></description>
			<content:encoded><![CDATA[<p>The usage of a Logging-Service in Tapestry is quite easy. You just have to use the @Inject Annotation in your classes.</p>
<pre class="brush: java; title: ; notranslate">import org.slf4j.Logger;
@Inject
private Logger logger;</pre>
</p>
<p>A little bit more complicated is the usage in a Tapestry-Service. Here an @Inject Annotation will fail, so you would have to get an instance for your logger from another source. One possibility would be to use a <strong>build-method</strong> in your Module class. But then, you would have to distribute such method for each service which should use a logger.</p>
<p>Tapestry helps you here and can contribute the needed Logger instance if you insert a constructor method to your service:</p>
<pre class="brush: java; title: ; notranslate">import org.slf4j.Logger;

private final Logger logger;

public MyServiceImpl(final Logger _logger){
    this.logger = _logger;
    this.logger.debug(&quot;Successfully initialized MyServiceImpl);
}</pre>
</p>
<p>Your Service will now be initialized with a working instance of the Logger-class.</p>
<p class="wp-flattr-button"></p> <p><a href="http://www.dev-eth0.de/?flattrss_redirect&amp;id=842&amp;md5=6fa050988b1ea44df37df7e86bb6bf1a" title="Flattr" target="_blank"><img src="http://www.dev-eth0.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.dev-eth0.de/logging-in-a-tapestry-service/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Buchempfehlung zu Tapestry 5</title>
		<link>http://www.dev-eth0.de/buchempfehlung-zu-tapestry-5/</link>
		<comments>http://www.dev-eth0.de/buchempfehlung-zu-tapestry-5/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 13:18:40 +0000</pubDate>
		<dc:creator>dev-eth0</dc:creator>
				<category><![CDATA[Tapestry]]></category>
		<category><![CDATA[Bücher]]></category>

		<guid isPermaLink="false">http://www.dev-eth0.de/?p=721</guid>
		<description><![CDATA[Zu Weihnachten standen mal wieder ein Paar Bücher über diverse Themen der Informatik auf der Wunschliste. Dabei hat mich ein Buch besonders begeistert:

Tapestry 5: Die  Entwicklung von Webanwendungen mit Leichtigkeit!

Mitte letzten Jahres hatte ich angefangen, mich mit dem Web-Framework Tapestry zu beschäftigen und war sehr schnell davon begeistert. Für mich als Programmierer, der ...]]></description>
			<content:encoded><![CDATA[<p>Zu Weihnachten standen mal wieder ein Paar Bücher über diverse Themen der Informatik auf der Wunschliste. Dabei hat mich ein Buch besonders begeistert:</p>
<p><a href=" http://www.amazon.de/gp/product/3827328446?ie=UTF8&amp;tag=dev-eth0-de-21" target="_blank"><strong>Tapestry 5: Die  Entwicklung von Webanwendungen mit Leichtigkeit!</strong></a></p>
<p>Mitte letzten Jahres hatte ich angefangen, mich mit dem Web-Framework Tapestry zu beschäftigen und war sehr schnell davon begeistert. Für mich als Programmierer, der mit HTML und PHP recht wenig am Hut hat, ist der Einstieg sehr einfach gewesen.</p>
<p>Zu dem Zeitpunkt gab es leider noch kein empfehlenswertes Buch und auch keine ausreichende Dokumentation zum Framework. Deswegen musste ich mir viele Informationen aus allerlei Quellen (Mailing-Listen, Foren, &#8230;) zusammensuchen. Das Problem hat sich Ende letzten Jahres aber zum Glück geändert, denn zu dem Zeitpunkt ist das oben genannte Buch erschienen.</p>
<p>In dem Buch erklärt Igor Drobiazko, der selbst ein aktiver Entwickler des Frameworks ist, fast alle Funktionen, die das Tapestry bietet. Besonders spannend fand ich das letzte Kapitel, in dem auf sehr tief gehende Möglichkeiten, dass Framework anzupassen, eingegangen wird.</p>
<p><a href="http://www.amazon.de/gp/product/3827328446?ie=UTF8&amp;tag=dev-eth0-de-21" target="_blank">Amazon-Link zum Buch</a></p>
<p>Falls einer der Blog-Leser sich für das Buch interessiert, würde ich mich sehr über sein Feedback dazu freuen!</p>
<p>Ich hatte mir noch ein gebrauchtes Exemplar eines anderen Buchs über Tapestry bei ebay gekauft, davon war ich aber leider sehr enttäuscht, da es nur um die Grundfunktionen ging und für fortgeschrittene Entwickler uninteressant war.</p>
<p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://www.dev-eth0.de/buchempfehlung-zu-tapestry-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using the GAE datastore</title>
		<link>http://www.dev-eth0.de/using-the-gae-datastore/</link>
		<comments>http://www.dev-eth0.de/using-the-gae-datastore/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 12:09:10 +0000</pubDate>
		<dc:creator>dev-eth0</dc:creator>
				<category><![CDATA[Google App-Engine]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Tapestry]]></category>
		<category><![CDATA[GAE]]></category>

		<guid isPermaLink="false">http://www.dev-eth0.de/?p=709</guid>
		<description><![CDATA[For nearly every web-application you need a database to store your information. Usually you'd use a relational database like Postgresql or MySQL and a mapper like Hibernate to access it in your code. And here comes the problem:

Googles doesn't offer you a relational database but their own database-system called BigTable which you can't access ...]]></description>
			<content:encoded><![CDATA[<p>For nearly every web-application you need a database to store your information. Usually you&#8217;d use a relational database like Postgresql or MySQL and a mapper like <a href="http://www.hibernate.org/" target="_blank">Hibernate</a> to access it in your code. And here comes the problem:</p>
<p>Googles doesn&#8217;t offer you a relational database but their own database-system called <a href="http://en.wikipedia.org/wiki/BigTable" target="_blank">BigTable</a> which you can&#8217;t access with the usual Hibernate-Mapping. And one more thing: Google doesn&#8217;t call it a database but a datastore <img src='http://www.dev-eth0.de/wp-includes/images/smilies/icon_wink.gif' alt="icon wink Using the GAE datastore" class='wp-smiley' title="icon wink" /> </p>
<p>In this example I&#8217;d like to show you, how to save, get, update and delete an object.</p>
<h3><span id="more-709"></span>How to access the datastore</h3>
<p>There are several possibilities to access the datastore from your code. You can read about it in the <a href="http://code.google.com/intl/de/appengine/docs/java/datastore/" target="_blank">API-Document</a>. I want to focus on using JDO to connect and save data in a datastore.We will use the <a href="http://www.datanucleus.org/" target="_blank">Datanucleus Access Platform</a> which offers us a framework for data management.</p>
<p>First of it all, we&#8217;ll need to import the required libraries in our maven project. Most of them are available in the official repositories or distributed with the GAE SDK:</p>
<ul>
<li>datanucleus-appengine 1.0.5</li>
<li>datanucleus-core 1.1.6</li>
<li>datanucleus-jpa 1.1.5</li>
<li>maven-datanucleus-plugin 1.1.4</li>
<li>jdo2-api 2.3-ec</li>
</ul>
<p>If we&#8217;d use Hibernate with Tapestry, we would just inject the Hibernate-Service/Session into your DAO. With JDO we need to define a Singleton which represents the PersistanceManager for ourdatastore.</p>
<p><a href="http://data.dev-eth0.de/code/gae/PersistanceManagerFactory.java" target="_blank">PersistanceManagerFactory.java</a></p>
<h3>Making a class persistence-ready</h3>
<p>We want to save and edit an USER in our datastore, therefore we&#8217;ll implement a class called User.java in our entities-package.</p>
<p><a href="http://data.dev-eth0.de/code/gae/User.java" target="_blank">User.java</a></p>
<p>As you can see, I added some annotations which tell Datanucleus, that we want to save our class persistent. By using annotation you spare defining your classes in XML-Files.</p>
<p>If you want to implement inheritance in your data, you need to define your base-class with the following annotation:</p>
<pre class="brush:java">@PersistenceCapable
@Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE)
public abstract class EntityWithLongID {</pre>
<h3>The DAO</h3>
<p>We want to follow the design pattern of DAOs which allows us, to inject a DAO in our page and then use the CRUD (Create, Receive, Update and Delete) methods (and more if we want).</p>
<p><a href="http://data.dev-eth0.de/code/gae/UserDAO.java" target="_blank">UserDAO.java</a></p>
<p>In our implementation of the interface, we make use of our PersistanceManagerFactory:</p>
<p><a href="http://data.dev-eth0.de/code/gae/UserDAOImpl.java" target="_blank">UserDAOImpl.java</a></p>
<p>As you can see, there&#8217;s a little problem with the update method.</p>
<p>The PersistenceManager doesn&#8217;t offer any possibility to just send a update of a User. You have to load the user, you want want to edit, then edit it and save it in the same transaction. Due to this fact, if we want to edit a user on our website, we would need to open the transaction if the page is requested. Then the transaction needs to be kept open till the submit button is pressed and the edited user can be saved.  To prevent this, we need to load the user we want to edit in our update method again. Afterwards we copy every field from the edited user to the newly loaded user and then commit the action.</p>
<p>We could do this with a simple use of the getter/setter methods but then we would need to edit our DAO if we add/remove a field to our User-Class. For that reason we  use our old friend: reflection <img src='http://www.dev-eth0.de/wp-includes/images/smilies/icon_wink.gif' alt="icon wink Using the GAE datastore" class='wp-smiley' title="icon wink" /> </p>
<p>The other methods should be rather clear&#8230;</p>
<p>To bind the DAO to the fitting Implementation, we add this line to our AppModule.java bind-Method:</p>
<pre class="brush:java">binder.bind(UserDAO.class, DummyUserDAOImpl.class);
</pre>
<h3>Configuring JDO and adding enhancement for our classes</h3>
<p>There are only to steps left to save data in our datastore:</p>
<p>We need to to configure Datanucleus/JDO, which happens through a little file, we put in the META-INF Folder (in Netbeans: Other Sources/META-INF):</p>
<p><a href="http://data.dev-eth0.de/code/gae/jdoconfig.xml" target="_blank">jdoconfig.xml</a></p>
<p>Now, we only have to tell Maven to enhance our class-Files in the build-process. To do so, we modify our pom.xml and add this code in the build / plugins section:</p>
<pre class="brush:xml">&lt;plugin&gt;
      &lt;groupId&gt;org.datanucleus&lt;/groupId&gt;
      &lt;artifactId&gt;maven-datanucleus-plugin&lt;/artifactId&gt;
      &lt;version&gt;1.1.4&lt;/version&gt;
      &lt;configuration&gt;
            &lt;log4jConfiguration&gt;${basedir}/log4j.properties&lt;/log4jConfiguration&gt;
            &lt;mappingIncludes&gt;**/entities/*.class, **/entities/account/*.class&lt;/mappingIncludes&gt;
            &lt;verbose&gt;true&lt;/verbose&gt;
            &lt;enhancerName&gt;ASM&lt;/enhancerName&gt;
            &lt;api&gt;JDO&lt;/api&gt;
      &lt;/configuration&gt;
      &lt;executions&gt;
            &lt;execution&gt;
                 &lt;phase&gt;process-classes&lt;/phase&gt;
                 &lt;goals&gt;
                     &lt;goal&gt;enhance&lt;/goal&gt;
                     &lt;goal&gt;enhance-check&lt;/goal&gt;
                &lt;/goals&gt;
           &lt;/execution&gt;
      &lt;/executions&gt;
&lt;/plugin&gt;
</pre>
<p>Now we just build our project and the everything should work&#8230;</p>
<p class="wp-flattr-button"></p> <p><a href="http://www.dev-eth0.de/?flattrss_redirect&amp;id=709&amp;md5=2ad61a6480422184f187f84f700c4827" title="Flattr" target="_blank"><img src="http://www.dev-eth0.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.dev-eth0.de/using-the-gae-datastore/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tapestry on Google&#8217;s app-engine</title>
		<link>http://www.dev-eth0.de/tapestry-on-googles-app-engine/</link>
		<comments>http://www.dev-eth0.de/tapestry-on-googles-app-engine/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 13:05:28 +0000</pubDate>
		<dc:creator>dev-eth0</dc:creator>
				<category><![CDATA[Google App-Engine]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Tapestry]]></category>
		<category><![CDATA[GAE]]></category>

		<guid isPermaLink="false">http://www.dev-eth0.de/?p=682</guid>
		<description><![CDATA[After deploying the first web-app to GAE, we now want to try to run a tapestry based application.

One problem I faced, resulted from google's JRE Class whitelist, which lists all classes, you can use in your application. The current stable release of Tapestry uses a blacklisted XML Parser.

Therefore you have two possibilities:

	Replace the XML-Parser
	or ...]]></description>
			<content:encoded><![CDATA[<p>After deploying the first web-app to GAE, we now want to try to run a tapestry based application.</p>
<p>One problem I faced, resulted from google&#8217;s <a href="http://code.google.com/intl/de/appengine/docs/java/jrewhitelist.html" target="_blank">JRE Class whitelist</a>, which lists all classes, you can use in your application. The current stable release of Tapestry uses a blacklisted XML Parser.</p>
<p>Therefore you have two possibilities:</p>
<ul>
<li><a href="http://wiki.github.com/derkoe/tapestry-sax-parser/" target="_blank">Replace</a> the XML-Parser</li>
<li>or just use Tapestry 5.2</li>
</ul>
<p>I decided to update my downloaded Tapestry Libs to 5.2.</p>
<h3>Create a project</h3>
<p>First we have to create a new Tapestry-app with Maven. I used the integrated support of Netbeans to achieve this. In <a href="https://repository.apache.org/content/groups/snapshots-group/" target="_blank">apache&#8217;s maven repository</a> you can find a quickstart-app for Tapestry 5.2, which is ideal for testing purpose.</p>
<p>Now you only have to add a appengine-web.xml file and that&#8217;s it&#8230;</p>
<p class="wp-flattr-button"></p> <p><a href="http://www.dev-eth0.de/?flattrss_redirect&amp;id=682&amp;md5=30e272874ab00aeeaee216d3e1b32ab9" title="Flattr" target="_blank"><img src="http://www.dev-eth0.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.dev-eth0.de/tapestry-on-googles-app-engine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tapestry in der App-Engine</title>
		<link>http://www.dev-eth0.de/tapestry-in-der-app-engine/</link>
		<comments>http://www.dev-eth0.de/tapestry-in-der-app-engine/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 10:12:11 +0000</pubDate>
		<dc:creator>dev-eth0</dc:creator>
				<category><![CDATA[Google App-Engine]]></category>
		<category><![CDATA[Tapestry]]></category>
		<category><![CDATA[GAE]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.dev-eth0.de/?p=666</guid>
		<description><![CDATA[Mein eigentliches Anliegen für den Einsatz der App-Engine ist, dass ich einen Web-Server einsparen möchte. Deswegen sollte natürlich auch eine Tapestry-Anwendung in der GAE laufen.

Leider gibt es in der aktuellen Tapestry Version 5.1.0.5 noch einige Bugs, die den Einsatz verhindern. Theoretisch sollte aber die Version 5.2, welche aktuell noch im Entwicklungsstadium ist, jedoch laufen.

Das ...]]></description>
			<content:encoded><![CDATA[<p>Mein eigentliches Anliegen für den Einsatz der App-Engine ist, dass ich einen Web-Server einsparen möchte. Deswegen sollte natürlich auch eine Tapestry-Anwendung in der GAE laufen.</p>
<p>Leider gibt es in der aktuellen Tapestry Version 5.1.0.5 noch einige Bugs, die den Einsatz verhindern. Theoretisch sollte aber die Version 5.2, welche aktuell noch im Entwicklungsstadium ist, jedoch laufen.</p>
<p>Das Vorgehen, um eine Tapestry Anwendung in die GAE zu laden ist wie bereits beschrieben recht einfach.</p>
<h3>Erstellen des Projektes</h3>
<p>Am einfachsten generiert man eine Tapestry-Anwendung mittels Maven. Ich nutze hierzu die in Netbeans integrierte Unterstützung. Im Repository gibt es eine Quickstart-Anwendung für Tapestry 5.2, welche für die Testzwecke ideal ist.</p>
<p>Nach dem erzeugen der Anwendung legt man nun wieder eine appengine-web.xml Datei an und schon kann man die Anwendung hochladen.</p>
<p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://www.dev-eth0.de/tapestry-in-der-app-engine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL beendet Verbindungen nach einigen Stunden idle</title>
		<link>http://www.dev-eth0.de/mysql-beendet-verbindungen-nach-einigen-stunden-idle/</link>
		<comments>http://www.dev-eth0.de/mysql-beendet-verbindungen-nach-einigen-stunden-idle/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 15:11:35 +0000</pubDate>
		<dc:creator>dev-eth0</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Tapestry]]></category>
		<category><![CDATA[Hibernate]]></category>

		<guid isPermaLink="false">http://www.dev-eth0.de/?p=612</guid>
		<description><![CDATA[Nachdem gestern ein Projekt von uns online gegangen ist, haben wir heute gemerkt, dass es noch einige Probleme mit der Datenbankanbindung gibt.
Gestern Abend funktionierte noch alles wunderbar, heute gibt Hibernate/Tapestry nur noch die  Fehlermeldung das die Verbindung beendet wurde und ich doch bitte im Connect-String autoReconnect auf on setzen sollte.

Leider hat das überhaupt nichts ...]]></description>
			<content:encoded><![CDATA[<p>Nachdem gestern ein Projekt von uns online gegangen ist, haben wir heute gemerkt, dass es noch einige Probleme mit der Datenbankanbindung gibt.<br />
Gestern Abend funktionierte noch alles wunderbar, heute gibt Hibernate/Tapestry nur noch die  Fehlermeldung das die Verbindung beendet wurde und ich doch bitte im Connect-String autoReconnect auf on setzen sollte.</p>
<p>Leider hat das überhaupt nichts gebracht, deswegen habe ich mich auf die Suche, nach einer anderen Lösung gemacht.</p>
<p>Zum Glück bin ich nicht allein <img src='http://www.dev-eth0.de/wp-includes/images/smilies/icon_wink.gif' alt="icon wink MySQL beendet Verbindungen nach einigen Stunden idle" class='wp-smiley' title="icon wink" /> </p>
<p><a href="http://michaelstudman.com/fullfathomfive/articles/2004/06/07/mysql-dropping-connections-and-hibernate" target="_blank">Hier</a> wurde die Lösung für das ganze Problem gepostet und was soll ich sagen: es läuft <img src='http://www.dev-eth0.de/wp-includes/images/smilies/icon_smile.gif' alt="icon smile MySQL beendet Verbindungen nach einigen Stunden idle" class='wp-smiley' title="icon smile" /> </p>
<p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://www.dev-eth0.de/mysql-beendet-verbindungen-nach-einigen-stunden-idle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tapestry Link mit JavaScript Bestätigung versehen</title>
		<link>http://www.dev-eth0.de/tapestry-link-mit-javascript-bestatigung-versehen/</link>
		<comments>http://www.dev-eth0.de/tapestry-link-mit-javascript-bestatigung-versehen/#comments</comments>
		<pubDate>Sat, 25 Jul 2009 22:11:37 +0000</pubDate>
		<dc:creator>dev-eth0</dc:creator>
				<category><![CDATA[Tapestry]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://www.dev-eth0.de/?p=610</guid>
		<description><![CDATA[Dank der Mixins von Tapestry kann man einen ActionLink und auch andere Components, die Mixins vertragen mit einem Bestätigungspopup versehen.
Eine genaue Erklärung dazu gibt es hier.

Danke an den Autor, hat mir viel Zeit gespart!]]></description>
			<content:encoded><![CDATA[<p>Dank der Mixins von Tapestry kann man einen ActionLink und auch andere Components, die Mixins vertragen mit einem Bestätigungspopup versehen.<br />
Eine genaue Erklärung dazu gibt es <a href="http://wiki.apache.org/tapestry/Tapestry5AndJavaScriptExplained" target="_blank">hier</a>.</p>
<p>Danke an den Autor, hat mir viel Zeit gespart!</p>
<p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://www.dev-eth0.de/tapestry-link-mit-javascript-bestatigung-versehen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Redirect mittels Javascript</title>
		<link>http://www.dev-eth0.de/redirect-mittels-javascript/</link>
		<comments>http://www.dev-eth0.de/redirect-mittels-javascript/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 15:48:25 +0000</pubDate>
		<dc:creator>dev-eth0</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Tapestry]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://www.dev-eth0.de/?p=607</guid>
		<description><![CDATA[Für ein aktuelles Projekt habe ich sowohl eine Mobile Seite und eine normale Website. Natürlich soll der Benutzer, wenn er mit einem iPhone ankommt, auch direkt auf die Mobile Seite weitergeleitet werden.
Dies lässt sich relativ einfach mit Javascript machen:
if((navigator.userAgent.match(/iPhone/i)) &#124;&#124; (navigator.userAgent.match(/iPod/i)))
{
location.replace("WOHIN SOLLS GEHEN?");
}
Um das jetzt in eine Tapestry Seite einzubauen reicht folgender Code:

if((navigator.userAgent.match(/iPhone/i)) &#124;&#124; ...]]></description>
			<content:encoded><![CDATA[<p>Für ein aktuelles Projekt habe ich sowohl eine Mobile Seite und eine normale Website. Natürlich soll der Benutzer, wenn er mit einem iPhone ankommt, auch direkt auf die Mobile Seite weitergeleitet werden.<br />
Dies lässt sich relativ einfach mit Javascript machen:<br />
<code>if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)))<br />
{<br />
location.replace("WOHIN SOLLS GEHEN?");<br />
}</code><br />
Um das jetzt in eine Tapestry Seite einzubauen reicht folgender Code:<br />
<code>&lt;script language="javascript"&gt;<br />
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)))<br />
{<br />
location.replace("mobile/iphone/index");<br />
}<br />
&lt;/script&gt;</code><br />
Dieser sollte in der Index Datei eingebaut werden, damit der User direkt vom Index auf die neue Seite weitergeleitet wird. Natürlich könnte man es auch ins Layout einbinden, dann würde der User von jeder Seite auf die mobile weitergeleitet.<br />
Nachteil: Der Benutzer kann sich nicht dafür entscheiden, einfach eine Unterseite aufzurufen und dort die normale Version zu verwenden.</p>
<p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://www.dev-eth0.de/redirect-mittels-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tapestry 5 und Glassfish</title>
		<link>http://www.dev-eth0.de/tapestry-5-und-glassfish/</link>
		<comments>http://www.dev-eth0.de/tapestry-5-und-glassfish/#comments</comments>
		<pubDate>Thu, 14 May 2009 12:23:10 +0000</pubDate>
		<dc:creator>dev-eth0</dc:creator>
				<category><![CDATA[Tapestry]]></category>
		<category><![CDATA[Glassfish]]></category>

		<guid isPermaLink="false">http://www.dev-eth0.de/?p=546</guid>
		<description><![CDATA[Da unser Application Server ein Glassfish V2 ist, waren kleine Anpassungen nötig, hier eine Tapestry 5 App zum laufen zu bekommen.

Der Fehler den Glassfish nach dem Deployment gebracht hat:

java.lang.RuntimeException: Exception constructing service 'TemplateParser':
Error invoking constructor...


- In das Verzeichnis /domains/domain1/lib/ext/ die woodstox*.jar und stax2*.jar aus der Tapestry Anwendung kopieren

- In der Glassfish AdminOberfläche in Configuration/System ...]]></description>
			<content:encoded><![CDATA[<p>Da unser Application Server ein Glassfish V2 ist, waren kleine Anpassungen nötig, hier eine Tapestry 5 App zum laufen zu bekommen.</p>
<p>Der Fehler den Glassfish nach dem Deployment gebracht hat:</p>
<p><code>java.lang.RuntimeException: Exception constructing service 'TemplateParser':<br />
Error invoking constructor...</code></p>
<p>- In das Verzeichnis /domains/domain1/lib/ext/ die woodstox*.jar und stax2*.jar aus der Tapestry Anwendung kopieren</p>
<p>- In der Glassfish AdminOberfläche in Configuration/System Properties folgendes hinzufügen:</p>
<p><code>javax.xml.stream.XMLEventFactory        com.ctc.wstx.stax.WstxEventFactory<br />
javax.xml.stream.XMLInputFactory        com.ctc.wstx.stax.WstxInputFactory<br />
javax.xml.stream.XMLOutputFactory     com.ctc.wstx.stax.WstxOutputFactory</code><br />
- Glassfish neustarten</p>
<p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://www.dev-eth0.de/tapestry-5-und-glassfish/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Erste Schritte mit Tapestry</title>
		<link>http://www.dev-eth0.de/erste-schritte-mit-tapestry/</link>
		<comments>http://www.dev-eth0.de/erste-schritte-mit-tapestry/#comments</comments>
		<pubDate>Thu, 07 May 2009 11:06:35 +0000</pubDate>
		<dc:creator>dev-eth0</dc:creator>
				<category><![CDATA[Tapestry]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.dev-eth0.de/2009/erste-schritte-mit-tapestry/</guid>
		<description><![CDATA[Dieses Semeste müssen wir für Softwareengineering einen Webshop entwickeln.
Die Wahl der Programmiersprache blieb uns überlassen, der Vorschlag war aber PHP.
Da weder ich, noch norf2k, mit dem ich in einer Gruppe zusammenarbeite, sich für PHP begeistern konnten, haben wir uns entschieden, lieber mal einen Blick auf die Java Produktpalette zu werfen.
Jetzt wird der Shop mit ...]]></description>
			<content:encoded><![CDATA[<p>Dieses Semeste müssen wir für Softwareengineering einen Webshop entwickeln.<br />
Die Wahl der Programmiersprache blieb uns überlassen, der Vorschlag war aber PHP.<br />
Da weder ich, noch <a href="http://www.norf2k.org">norf2k</a>, mit dem ich in einer Gruppe zusammenarbeite, sich für PHP begeistern konnten, haben wir uns entschieden, lieber mal einen Blick auf die Java Produktpalette zu werfen.<br />
Jetzt wird der Shop mit Tapestry 5 und Hibernate entwickelt.<br />
Was uns von anfang an überraschte, war die Leichtigkeit, mit der man schnell mal eben so eine Seite hingezimmert hat und dann mit Logik versehen hat.<br />
Durch die Services und ApplicationState Properties muss man sich um kaum etwas selber kümmern, da dies Tapestry macht.<br />
Leider gibt es in der Tapestry Doku teilweise etwas verwirrende oder keine Beispiele, weswegen man ab und an etwas rumprobieren muss.</p>
<p>Eins weiß ich aber sicher: Es macht Spass <img src='http://www.dev-eth0.de/wp-includes/images/smilies/icon_wink.gif' alt="icon wink Erste Schritte mit Tapestry" class='wp-smiley' title="icon wink" /> </p>
<p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://www.dev-eth0.de/erste-schritte-mit-tapestry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

