Please do post it, it would be quite handy.
Jeff Lubetkin wrote:
We use both server side and client side persistence at Zillow. We've
had no problems with server session and PageLink, but we did have the
same problem as Geoff, where client persisted data ended up on too many
URLs. What we really wanted was for the data to persist across form
submissions only, so that when the page containing a form re-rendered
due to a validation failure, it had all of its necessary data available.
We solved this by creating a new client persistence strategy that only
encodes the persisted state to URLs that are being used in a post. The
code is trivial, it works great, and I can share it on the wiki if
there's interest.
jeff
PS Not sure what you mean by @PageLink not being "session-aware",
Michael. For cookied users, linking a client back to the session is
entirely up to the servlet container. For non-cookied users, the only
servlet obligation is to pass URLs through the encoder, which PageLink
does. Can you characterize your problem better?
-----Original Message-----
From: Gentry, Michael (Contractor) [mailto:[EMAIL PROTECTED]
Sent: Monday, April 03, 2006 7:50 AM
To: Tapestry users
Subject: RE: Why does PageLink include state in the URL?
I find this a bit interesting because in my experience, @PageLink has
ignored my session scoped data (it is not session-aware), which kept
resulting in NPEs (and the nasty exception page for users) on my
navigation links when the session timed out (all of my pages use session
data to render). My workaround for that was to switch everything to use
@DirectLink and call a silly listener method:
public String gotoPage(String pageName)
{
return pageName;
}
And then in the .html:
<a href="#" jwcid="@DirectLink" listener="listener:gotoPage"
parameters="literal:Home">...</a>
I don't know if such a technique would be helpful for you or not (I've
not used client-side persistence).
/dev/mrg
-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Geoff Callender
Sent: Monday, April 03, 2006 10:27 AM
To: [email protected]
Subject: Why does PageLink include state in the URL?
When my page has @Persist("client") on some properties, the state
becomes
included in the URL of PageLinks. eg.
<a href="/perspectives/app?page=web%2Fmain%
2FTestsPage&service=page&state:Home=BrO0ABXcOAAAAAQAAB3N0cmluZ3
NzcgATamF2YS51dGlsLkFycmF5TGlzdHiB0h2Zx2GdAwABSQAEc2l6ZXhwAAAA
A3cEAAAACnQABUZpcnN0dAAGU2Vjb25kdAAFVGhpcmR4">PageLink</a>
Does this serve a purpose?
The problem is that when the URL becomes too long then the link fails
silently.
But all I want to do is go to a different page with a link on the
navigation bar,
regardless of the data on the current page.
Geoff
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
__________ NOD32 1.1467 (20060402) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com
.........................................
Derick Fernando
Lead Architect
[EMAIL PROTECTED]
http://www.thelabllc.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]