I always avoid @Persist as it makes your webapp far more scalable. In this example, you can pass policyId as an event context to all of the ajax events on your page.
eg: <t:eventlink event="myEvent" context="policyId" zone="myZone"> void onMyEvent(int policyId) { policy = policyRepository.get(policyId); } A better idea is to configure a ValueEncoder [1] for your Policy object. Then, you can forget about policyId and just reference the Policy object in your onActivate and ajax event context. eg <t:eventlink event="myEvent" context="policy" zone="myZone"> @Property private Policy policy; void onActivate(Policy policy) { this.policy = policy; } void onMyEvent(Policy policy) { this.policy = policy; } [1] http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ValueEncoder.html -- View this message in context: http://tapestry.1045711.n5.nabble.com/Best-practice-activation-context-and-later-ajax-calls-tp5717936p5717939.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