Thanks for the reply - I'd have never thought it's stored in context in such way. What If I want to store a collection of clients. Anyways, what I do in SearchClient is running the setClient() method of ClientsList, as I suppose it's not being used at all how is the data supposed to be placed in this EventContext? How should I put in in my SearchClient.java?
And one more thing if I can still bother you, when is exactly onPassivate() called? I've read about it on some sites but how come is it invoked about 10 times? Thanks again for help. Thiago H. de Paula Figueiredo wrote: > > Em Tue, 06 Oct 2009 14:36:51 -0300, 976 <amsc...@gmail.com> escreveu: > >> How should then onActivate and onPassivate look like? > > Suppose your Client class has the following properties: id (an Integer), > firstName, lastName. > > Your onActivate would look like this (not tested): > > private Client client; > > public void onActivate(EventContext context) { > > client = new Client() > > int count = context.getCount(); > > if (count >= 1) { > client.setId(context.get(Integer.class, 0)); > } > if (count >= 2) { > client.setFirstName(context.get(String.class, 1)); > } > if (count >= 3) { > client.setastName(context.get(String.class, 2)); > } > > } > > public Object onPassivate() { > > List list = new ArrayList(); > list.add(client.getId()); > list.add(client.getFirstName()); > list.add(client.getLastName()); > > return list; > > } > >> I'm not able to sth that seemed to be easy - it normally takes me few >> mins do to it in JSF or Struts, so why not in Tapestry. > > You just aren't used to Tapestry yet as you're to JSF or Struts, so the > comparison here is not exactly fair. > > -- > Thiago H. de Paula Figueiredo > Independent Java consultant, developer, and instructor > http://www.arsmachina.com.br/thiago > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > > -- View this message in context: http://www.nabble.com/passing-values-between-pages-%28search--%3E-result%29-tp25765698p25775368.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