Try using the @Persist("flash") to store your real answer. The flash persistence strategy covers the situation where you only want the value to be stored until the next request.
Jonathan > -----Original Message----- > From: Tomasz Dziurko [mailto:[EMAIL PROTECTED] > Sent: Sunday, April 13, 2008 12:52 PM > To: Tapestry users > Subject: Problem with page life cycle > > I encountered some problem connected with page life cycle. > > There is a page examplePage.java, which should on every refresh > generate new simple math question to check against spam bots. > Generating is done in onActivate() method. But problem is that when > user submits form, method onActivate is called again (question is > re-generated) and checking is done between different > simpleMathQuestion than user calculated result. > > Questions: > 1. Is there any method called after user clicks 'Submit' and before > onActivate(), where I could put my validation logic? > 2. Maybe I should choose different solution? Maybe put > simpleMathQuestionGenerate() in other place? > > Thank you in advance for your help > > -- > Tomasz Dziurko > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]