To be more clear I added a basic page with a simple form.

See below which methods are called. Why is the onActivate() called before
the onSuccess and onSubmit()?
In my onActivate I call a doSearch(), so basically for every form submit,
the search query is called twice.
This is very inefficient. How can I solve this?

onActivate(int nr) 0
onPrepareForSubmit(int nr) 2
onPrepareFromFormTest(int nr) 2
setInputString(String inputString) null
onSuccessFromFormTest()
onSubmit(), return true
onPassivate() return 2
onActivate(int nr) 2
getPageContext()
onPassivate() return 0
onPrepareFromFormTest(int nr) 2
getInputString()

Thanks,
Peter

On Wed, Apr 1, 2009 at 10:50 AM, Peter Kanze <peterka...@gmail.com> wrote:

> Hello
>
> Today I noticed that when I submit a form by clicking the submit button,
> tapestry first calls the onActivate and then the onSuccesFromMyForm.
>
> Is this normal tapestry behaviour? What is the reason behind it?
>
> See my output after I clicked the submit button:
>
> onActivate(String categoryName, int pageNr) Trekkers en werktuigen, 1:
> false
>     doSearch() //in onActivate I call the doSearch()
> onPrepare
> onSuccess
> onPassivate()
> onActivate(String categoryName, int pageNr) Trekkers en werktuigen, 1:
> false
>     doSearch() //in onActivate I call the doSearch()
> onPassivate()
> onPrepare
>
> Can anyone explain to me why the onActivate is called before the submit?
> And why the onActivate is called twice?
>
> I have not images or something like that in my tapestry page.
>
> Thanks!
> Peter
>
>

Reply via email to