in your sample you need a
@Persist("flash")
private Contact contact ;
in your view contact
But using activate passivate would be smarter.
To complete Stephan advice
I suggest to read also activate passivate sample
http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/navigation/onactivateandonpassivate/3
You will need to replace your actionlink by an pagelink with the same
t:context="contact.id
and add the following code to the your view contact
private Long _Id;
// The code
// onPassivate() is called by Tapestry to get the activation context
to put in the URL.
Long onPassivate() {
return _Id;
}
// onActivate() is called by Tapestry to pass in the activation
context from the URL.
void onActivate(Long Id) {
_Id = Id;
}
// setupRender() is called by tapestry at the start of rendering -
it's good for things that are display only.
void setupRender() throws Exception {
// Convert the id into a Person.
contact = dao.getById(_Id, Contact.class);
}
2010/11/8 Stephan Windmüller <[email protected]>
> On 08.11.2010 13:52, Josh Kamau wrote:
>
> > I am trying to pass an object from one page (a page with a grid) to
> another
> > page (the page with BeanDisplay).
>
> Perhaps you should take a closer look into JumpStart, since it covers
> many basic Tapestry concepts:
>
> http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/
>
> Your question is answered here:
>
>
> http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/state/passingdatabetweenpages1
>
> HTH
> Stephan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>