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
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
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
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