[Seaside] Call application with parameter
dtrussardi at tiscali.it
dtrussardi at tiscali.it
Tue Apr 17 17:09:51 UTC 2012
Ciao,
i have a WAComponent subclass DisplayArticoli register as 'articoliOnLine' .
The application implement some traditional anchor and some AJAX element.
The goal of this application is rendering all the items of one specific shop.
I' have some shops: shopA, shopB, shopC
.
When from browser i request it i'm interested to pass a parameter with a specific shop name.
For example:
http://www.test.com:9090/articoliOnLine?_shop=shopA
So when a new session is open a specific shop reference is set.
What is the best implementation to do it ?
I do some test:
for now i change the WASession handleFiltered: aRequestContext.
If in the aRequestContext request fields i found the _shop parameter
i set the shop reference in the WASession shop instance to the relative value.
In DisplayArticoli renderContentOn: method i had:
html document addLoadScript: (html jQuery ajaxSetup
onError: (html javascript
alert: 'The session has expired. ';
goto: 'http://www.test.com:9090/articoliOnLine?_shop=shopA' ))
this redirect the browser when a ajax request trigger a error ( after a expired session for example ) and work fine.
The problem is relative to the anchor event when the session is expired because the default
expiredRegistryKey
"The session key has expired, redirect the request to the home directory preserving the path as good as possible."
lose the path _shop=shopA parameter.
Is my test in the right direction or i wrong ?
Any considerations is welcome.
Thank,
Dario
More information about the seaside
mailing list