Re: Problem with page life cycle

2008-04-13 Thread Joost Schouten (ml)
Assuming this is about T5 as I know nothing of earlier versions, I would personally have the done as follows: @Persist private YourQuestionObj actualQuestion; @SetupRender private void setup() { actualQuestion = genereateSimpleMathQuestion(); } SetupRender is only called to prepare for rend

Re: Problem with page life cycle

2008-04-13 Thread Tomasz Dziurko
It didn't solved my problem, but I found another way of doing it. Simplfied code: onActivate() { oldSimpleMathQuestion = new SimpleMathQuestion(actualQuestion.question, actualQuestion.answer)); actualQuestion = genereateSimpleMathQuestion(); } onSuccess { if(oldSimpleMathQuestion.ans

RE: Problem with page life cycle

2008-04-13 Thread Jonathan Barker
t: 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 ag

Problem with page life cycle

2008-04-13 Thread Tomasz Dziurko
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 calle