Ok. Here is the problem. There is a PageLink and a DirectLink on the page.
the DirectLink gets called and the proper value is passed in and incremented
by 1, the encoded state for the DirectLink is correct, but the PageLink on
the same page, when it goes to generate it's own URL somehow gets back a
different PersistentPropertyData with the previous value in it and it
overrides the one DirectLink created. I'm looking deeper but can't see
anything right off. I've attached the files.
----- Original Message -----
From: "Adam Greene" <[EMAIL PROTECTED]>
To: "Tapestry users" <[email protected]>
Sent: Wednesday, August 03, 2005 12:04 AM
Subject: Problem with client side persistence
I have this piece of code:
@Persist(value="client")
public abstract int getClientValue();
public abstract void setClientValue(int what);
public void doAdd() {
int value = getClientValue() + 1;
setClientValue(value);
}
and a DirectLink on the page that calls doAdd(), the problem is that the
ClientValue will go from 0 to 1 on the first click, but get stuck there. If
I click the link again and again, it will only go to 2 (1 + 1) and if I
click a PageLink that basically calls the same page again, the value becomes
1. Is there any way to get this code working with client side persistence?
Am I missing something?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]