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

3 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.

Anonymous said...

You write very well.

Anonymous said...

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