Monday, February 5, 2007

Application State Objects in Tapestry - changed?

I've noticed in 4.1.2-SNAPSHOT, that ASO handling has changed somewhat. From what I've read, the ASO should be created upon first request. That used to include OGNL accessors as well (<= 4.1.1), but now with the latest snapshot, you get an IllegalStateException if you don't access it prior to the OGNL accessor. One solution, which seems a hack, is to simply access the ASO from a PageBeginRenderListener.

Here's a test app which shows the problem. Uncomment the pageBeginRender hack in Home.java to see it work.

Update: Bug reported: http://issues.apache.org/jira/browse/TAPESTRY-1256

4 comments:

Julian said...

Sorry, the pom in this app referenced an unpublished artifact, so it wouldn't build if you used maven. That has been fixed.

Content said...

You write very well.

dorla said...

Really great ideas. I like every example. Just might have to try these...
more template

Anonymous said...

отличный сайт!