[Seaside] Call application with parameter

dtrussardi at tiscali.it dtrussardi at tiscali.it
Wed Apr 18 12:11:31 UTC 2012


Thank Paul,

	i read your reference and do some test.

	My web http request is: 	  http://www.test.com:9090/articoliOnLine?shop=shopA

	I change the	 updateUrl:  	 to
		
		updateUrl: anUrl
   			super updateUrl: anUrl.

			anUrl purgeOtherFields.
	
			anUrl addField: 	'shop'  value: 'shopA'.


	Now all the request ( ajax  - anchor  ) work fine.

	The only doubt is relative to the url display in the browser.

	After click one anchor it is set to : 

	http://www.test.com:9090/articoliOnLine?shop= shopA#_s=HIGDcqS-fkc87zSa&_k=SbwG0-VBlC6tn8-l&shop= shopA&12

	The	 query filed include two 	 shop = shopA     field-value pairs.

	It's right ?

		Ciao, thank for any suggestions,

			Dario

> I think this should be helpful:
> 
> http://book.seaside.st/book/in-action/session/recovering
> 
> 
> 
> 
> 
> 
> On 12-04-17 10:09 AM, dtrussardi at tiscali.it wrote:
>> 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
>> 	_______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> 
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20120418/97d4d100/attachment.htm


More information about the seaside mailing list