Tapestry Training -- From The Source

Let me help you get your team up to speed in Tapestry ... fast. Visit howardlewisship.com for details on training, mentoring and support!

Wednesday, February 22, 2006

Update to tapestry-flash

I've updated the build for tapestry-flash to compile for JDK 1.3. I haven't changed the version number, but Maven 2 should pull it down anyway, since the time stamp and MD5 have changed.

2 comments:

Anonymous said...

Howard, is it possible to do cross-page flashes? Take an example of a change password page. You click a link on the Home page which takes you to a page with a Change Password form. You enter your new password and click Save. The page saves your new password and redirects you to the Home page. Your flash example shows the page redirecting back to itself. Can the Home page display a flash set by the ChangePassword page? In Rails, the flash is a session-scoped bucket that any page can access but your implementation would seem to preclude this. Is this possible?

mike

Howard said...

Well, the property doesn't have to be on the current page. So page A could obtain page B and set a property of B that persists in the flash.

The next time page B renders, it will see the flashed property value.

In this situation, you don't need to do the redirect after post (though its always a good idea if you can get away with it).

It seems to me that you do run the chance of conflicts using a Rails approach (a flat namespace for flashed values). Flat namespaces don't scale to large projects and development teams, because communication between team members if never perfect (or even close).