The Artima Developer Community
Sponsored Link

Java Buzz Forum
Migrating to 4.1.2

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Warner Onstine

Posts: 242
Nickname: warnero
Registered: Aug, 2003

Warner Onstine is Java programmer and writer of two tech books
Migrating to 4.1.2 Posted: Jan 24, 2008 1:08 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Warner Onstine.
Original Post: Migrating to 4.1.2
Feed Title: Tapestry Live
Feed URL: http://www.jroller.com/WarnerOnstine/feed/entries/rss
Feed Description: Home of the Tapestry Live book by Warner Onstine.
Latest Java Buzz Posts
Latest Java Buzz Posts by Warner Onstine
Latest Posts From Tapestry Live

Advertisement

Since I‘m sure others might be going through this same thing I thought I‘d blog any issues that I‘ve run across while updating Events Calendar from 4.0.2 up to 4.1.2.

Since I‘m using Maven for my build the first thing I needed to do was to update all my references in my pom.xml file.

First thing is the new Tapestry entries:

<dependency>
<groupId>org.apache.tapestry</groupId>
<artifactId>tapestry-framework</artifactId>
<version>4.1.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.tapestry</groupId>
<artifactId>tapestry-contrib</artifactId>
<version>4.1.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.tapestry</groupId>
<artifactId>tapestry-annotations</artifactId>
<version>4.1.2</version>
<scope>compile</scope>
</dependency>

Then we have to update to a SNAPSHOT of Tacos (as alot of what it did is now directly in the Tapestry core):

<repository>
<id>TapestrySnapshotRepo</id>
<name>Tapestry Snapshot Repository</name>
<url>http://people.apache.org/repo/m2-snapshot-repository</url>
</repository>
<dependency>
<groupId>net.sf.tacos</groupId>
<artifactId>tacos-core</artifactId>
<version>4.1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>

I also updated my dependency for tapestry-spring as well:

<dependency>
<groupId>com.javaforge.tapestry</groupId>
<artifactId>tapestry-spring</artifactId>
<version>[1.0.0]</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>tapestry</artifactId>
<groupId>tapestry</groupId>
</exclusion>
<exclusion>
<artifactId>tapestry-annotations</artifactId>
<groupId>tapestry</groupId>
</exclusion>
<exclusion>
<artifactId>tapestry-contrib</artifactId>
<groupId>tapestry</groupId>
</exclusion>
</exclusions>
</dependency>

The whole exclusion thing tells Maven to ignore the tapestry-spring dependencies on Tapestry (plus this still relies on an older version of Tapestry so you want to make sure you dump it or you‘ll end up with two copies of Tapestry‘s jars in your war file).

Once that was done I tried to build in Eclipse and got some errors in some odd places. The first one was in PlaceModel which I was using to populate the list of places in my event page. This was due to an interface change in IPropertySelectionModel which added a new method called isDisabled(int index). Since all of my items were going to be available I just returned true, but I‘m sure that this could be used through some of the Ajax stuff in 4.1.2 now.

Another error was in PlaceIdRenderer, the superclass ListItemRenderer which used to be in the Tacos was now in Tapestry core under org.apache.tapestry.scriptaculous.ListItemRenderer. (Note: I no longer use this but had left in the source, I may use it at some point in the future).

In Border.html and Login.html I removed all of the script elements as Tapestry handles this for me automatically now.

Finally to get stuff working I had to replace some of my Tacos components with the newly updated Tapestry components. In NewEvent.html convert AjaxForm to plain old Form:

-<form jwcid="newEvent@tacos:AjaxForm" success="listener:addEvent" delegate="ognl:validationDelegate">
+<form jwcid="newEvent@Form" success="listener:addEvent" delegate="ognl:validationDelegate">

And in NewEvent.page convert AjaxDirectLink to plain old DirectLink:

-<component id="linkNew" type="tacos:AjaxDirectLink">
+<component id="linkNew" type="DirectLink">
...
-<component id="linkChoose" type="tacos:AjaxDirectLink">
+<component id="linkChoose" type="DirectLink">

That‘s about it! I‘d be curious to see if anyone else has run into strange 4.0 to 4.1.2 conversion issues. I had a few bugs in-between the 4.1.2-SNAPSHOT and this one that disappeared (or they could have been Tacos SNAPSHOT issues too).

Read: Migrating to 4.1.2

Topic: Sun's buying MySQL. Previous Topic   Next Topic Topic: Sun buying MySQL, Oracle buying BEA from PeopleOverProcess.com

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use