I agree that its a bit awkward, though it is quite "pure", to redirect-after-action.
5.2 includes the ability to request a page to render immediately from an event handler method by returning a StreamPageContent instance. This was actually a suggestion from a student at one of my SkillsMatter classes, and implemented by Igor. 2011/5/17 Василий Жуков <vip.del...@gmail.com>: > Thx! I made my own "t:formif" with @Persist field and ComponentAction :) > It's ugly, i know. > > I have become frustrated in the pattern of Post-Redirect-Get. > There are so many code for saving and restoring component states in/from > HttpSession, three @Persist strateg strategies, my ugly t:formif... > > I'm almost inclined to implement (in tapestry 5) pattern AjaxPost->Update > Zones. I think it's easier than Post-Redirect-Get. > In this case all components will be stateless, no HttpSession, partial form > update will be very simple, form POST with partial updated zones will be > working, no persist strategies. > But now I have no time for it and all my code works fine now. In the future > I definitely implement it. > > Vasily > > 2011/5/17 Josh Canfield <joshcanfi...@gmail.com> > >> > I have some problem with t:if >> >> I think your problem is really with the redirect-after-post paradigm. >> >> > Yes, I can use @Persist on "check" property, but I need a full page >> refresh >> > when pressing F5. >> >> Try @Persist("flash"). When you read the value it's removed from the >> session until you store it again. This generally solves the problem. >> The one place where you might it a snag is if you redirect to a >> different page after posting the form. In that case the value will >> remain, you can call >> ComponentResources#discardPersistentFieldChanges() if you know you're >> not going to be redirecting to another page. >> >> Josh > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org