I'm guessing that you render the "recalculate" zone by submitting another
form... correct?
If so, you could include the values from the first calculate as in the second form.
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/Best-practice-activation-context-and-later-ajax-
Ok it works with the onPassivate in this case:
void onActivate(int policyId) {
if(policy == null) {
policy = policyRepository.get(policyId);
}
}
int onPassivate() {
return policy.getId();
Chris is right, if you include an onPassivate() with your policy/policyId
there is no need to pass it in the ajax event as it tapestry will implicitly
populate the value for you.
You might also want to consider the @PageActivationContext annotation which
takes care of onActivate() and onPassivate(
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:
void onMyEvent(int policyId) {
policy = policyRepository.get(policyId);
}
A better idea is to configure a ValueEncoder [1]
Hi,
Have you checked out: http://tapestry.apache.org/page-navigation.html
To see if "onPassivate" or providing an explicit activation context can help you
--
Chris
On Mon, Nov 12, 2012 at 4:20 PM, nquirynen wrote:
> Hi
>
> I have a page with an activation context:
>
> void onActivate(int poli