[aida] Chrome and Safari did NOT find the Aida Context

Janko Mivšek janko.mivsek at eranova.si
Thu May 6 08:45:57 CEST 2010


Hi Bruno!

Is it possible that order of two Ajax requests is in question? Namelly,
for many actions two Ajax requests are sent and it is possible that they
don't come in the order as they are sent. For closing a popup you have
one request for close and another for update. It could be that popup
context is "closed" before the other request come and that's why this
error occurs.

Best regards
Janko

On 05. 05. 2010 21:33, Smalltalk wrote:
> Hi,
> 
>  
> 
> I do NOT fix the problema, but i found why this is happening.
> 
>  
> 
> The problem is the method: WebApplication>>findCreateOrSerializeContextFor:
> 
>  
> 
> findCreateOrSerializeContextFor: aRequest
> 
>                 "and set the current context and view"
> 
>                 "for posts and ajax request the context id must always
> be present in request!"
> 
>                 "Serialize execution if some other request is already
> executing"
> 
>                 | ctx |
> 
>  
> 
>                 ctx := self findContextFor: aRequest.
> 
>                 (ctx isNil and: [aRequest isPost or: [aRequest
> isAjaxRequest]]) ifTrue: [^nil]. "this should not happen!"
> 
>                 ctx isNil ifTrue: [ctx := self findContextSameViewFor:
> aRequest]. "temporary"
> 
>                 ctx isNil ifTrue:
> 
>                                 [ctx := (WebContextFirst newOn: self)
> view: aRequest view.
> 
>                                 self addContext: ctx].
> 
>                 ctx isBusy ifTrue: [ctx serialize: aRequest]. "Dolphin
> fix"  "context is busy, serialize execution"
> 
>                 ctx request: aRequest.
> 
>                 aRequest context: ctx.
> 
>                 ^ctx
> 
> In Opera and Mozilla after the popup windows is closed this method is
> executed and:
> 
> (ctx isNil and: [aRequest isPost or: [aRequest isAjaxRequest]]) answer
> FALSE. (which is OK)
> 
>  
> 
> But under Chrome and Safari
> 
> (ctx isNil and: [aRequest isPost or: [aRequest isAjaxRequest]]) answer
> True. According with comments  "this should not happen!"
> 
>  
> 
> Now I going to find what is causing this difference.
> 
>  
> 
> Regards,
> 
> Bruno
> 
>  
> 
>  
> 
> 
> 
> _______________________________________________
> Aida mailing list
> Aida na aidaweb.si
> http://lists.aidaweb.si/mailman/listinfo/aida

-- 
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si


More information about the Aida mailing list