Hi,

you have to store the results (or preferable the search parameters) because
tapestry redirects the browser after the form POST:

https://tapestry.apache.org/component-events-faq.html

To store the state you can add @Persist annotations to the fields that
store your search parameters and move the query logic to a seperate method
out of the form success event handler. (or you could persist the search
results, but that's generally not advisable).

@Property
@Persist
private Street street;

Another option to persist the state is to add the query parameters in the
page activation context, simply add @PageActivationContext annotation to
you fields that should be persisted with activation/passivation.

@Property
@PageActivationContext
private Street street;

The latter is generally better, because you don't need a session on the
server.
The first one stores the state of the search parmeters, even if you go to
another page and come back later.



hth,

Felix

Reply via email to