Hello Have a look at http://tapestry.apache.org/tapestry5.1/guide/pagenav.html
If you want to use 'activate' you have also to define the pending 'passivate' method. Christophe. 2009/10/6 976 <amsc...@gmail.com> > > I'm totally new to Tapestry (2 days playing with it), but I'm stuck with > quite simple problem;( (At least I guess so). > > What I want to to is to create 4 pages for Client entity: > - list (list all clients or ones from search result) > - edit > - add > - find > > Didn't have any problems with first three, but having problems with last > one. > > I've created SearchClient, AddClient, ListClients pages (java+tml). > > What I want to do is to input search criteria on SearchClient and list the > results in ListClients and I don't really now how to pass data between > pages. > First of all AddClient and SearchClient have > > @IncludePage > private ListClients listClients; > and AddClient has: > public Object onSuccess() { > clientService.addClient(client); > return listClients; > } > > which works just fine. > > In SearchClient I firstly tried to retrieve data onSuccess and pass the > collection to onActivate method of ListClients but passing it didn't work;( > Can't get the idea of what happens there, but what I wanted to do show > collection passed from SearchClient if it existed and list all if it didnt. > And always came up with list of all clients. > > Later I tried putting in SearchClient: > Object onSuccess() { > listClients.setClient(client); > return listClients; > } > > Still - this client was always null in the following: > public void onActivate(){ > if(client==null){ > clients = clientService.getClients(); > }else{ > clients = clientService.getClientByCriteria(client); > } > } > > After doing some search I tried doing @Persist on client property in, but > it > turned out to ALWAYS be set which wasn't also good as couldn't list all > clients - always one from criteria. > > So I tried @Persist("flash") - and the behavior of this one I can't even > describe;) > > I really tried to google the solution for search screen + results screen > but > with no luck. > > Is this onActivate() approach good at all or should I use some other way of > passing data between pages? > As I said - what I want to accomplish is to list clients from search screen > and if this criteria was not created at all (list all clients from > dirrenent > link) I want to list them all. > > > Will be very grateful for any help. > bwt. I made sure to look over all info on tapestry main page;( + other > googled examples/tutorials > > Thanks, > Adam > > -- > View this message in context: > http://www.nabble.com/passing-values-between-pages-%28search--%3E-result%29-tp25765698p25765698.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >