hi leon,

Tapestry 5 uses a redirect to display the result of a component action.
Therefore the data has to be saved/stored between the two requests.
(i call the first request action request and the second request render
request as it will then render the page)

"flash" will store the data in the session and remove it after the render
request

of course... if you, for example, use Hibernate with second-level caching 
you  could have a getImportRequsts method reading the data from the DAOs
on every render request 

getImportRequests() {
    return importDAO.findImportRequests(importRequestSearch);
}

please read http://tapestry.apache.org/tapestry5/tapestry-core/ 
(at the end)

or watch the screencasts (although a bit outdated an example/answer why
persist is needed is available)

http://tapestry.apache.org/tapestry5/screencast.html

g,
kris




Leon Derks <[EMAIL PROTECTED]> 
08.05.2008 14:54
Bitte antworten an
"Tapestry users" <users@tapestry.apache.org>


An
Tapestry users <users@tapestry.apache.org>
Kopie

Thema
@Persist("flash") question







In my page I have a the following function that is executed when I click 
on the search button in my page.

@Persist("flash")
private List<ImportRequest> importRequests = new 
ArrayList<ImportRequest>();

@OnEvent(component = "searchForm", value = "submit")
    public void doSearch() {
        importRequests = 
importDAO.findImportRequests(importRequestSearch);
    }

The results are only shown on my page when I use @Persist("flash") for 
the importRequests.

Is it possible to do this without an @Persist("flash")?

Leon

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to