|
Subject: Re: DirectLink on a button and success messages Newsgroups: gmane.comp.java.tapestry.user Date: 2004-08-03 17:45:00 GMT (4 years, 48 weeks, 1 hour and 44 minutes ago) Right... so <property-specification name="message" persistent="yes"/> is the equivalent in Tapestry to put the message in session scope. You can set it to null later if you like, to clear it out. Another alternative, put a message on your visit object so you have a single message, not per-page as would be the case with a persistent page property-specification. As for duplicate submissions - the token stuff, as far as I know, is not something built into Tapestry. Not quite related, but we use a custom submit component that uses JavaScript to disable the button immediately after it is pressed - otherwise hitting the button very quickly multiple times causes a page lock error. My current apps are not CRUD-style (thank goodness!), so duplicate submissions has not been a recent issue of mine - perhaps others building CRUD apps can post their techniques. Erik On Aug 3, 2004, at 12:08 PM, Matt Raible wrote: > In Struts, WebWork and Spring MVC - I've simply stuffed the messages > into the session, then removed them after displaying them in the next > page. Or I've used a Filter to remove them from the session and stuff > them into the request for display on the next page. Using a redirect > seems to be the easiest way to prevent duplicate submission - although > all 3 frameworks mentioned have other ways of preventing duplicate > submissions. > > Matt > > On Aug 3, 2004, at 9:54 AM, Erik Hatcher wrote: > >> Matt - just out of curiosity, in your other framework examples, how >> have you handled the duplicate submission issue and message issues? >> You could make the message a persistent page property as a first >> pass, and still use the RedirectException (although >> PageRedirectException is probably more appropriate). >> >> I don't really recommend persistent properties though as I prefer to >> keep things stateless, but it is one possible way to achieve what >> you're after. >> >> Erik > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: tapestry-user-unsubscribe <at> jakarta.apache.org > For additional commands, e-mail: tapestry-user-help <at> jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: tapestry-user-unsubscribe <at> jakarta.apache.org For additional commands, e-mail: tapestry-user-help <at> jakarta.apache.org |
|
|