Ajax and dynamic variables

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Ajax and dynamic variables

NorbertHartl
I need to provide some context to my magritte components and tried to use WADynamicVariable for it. But all the requests that are coming in are ajax requests. I've used the use:during: for the dynamic variable in the rendering of the topmost component. But the ajax requests seem to take another route making my usage of the dynamic var useless.

What would be the best extension point for injecting a block to make use of dynamic vars?

thanks,

Norbert_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Ajax and dynamic variables

mmimica
As I understand it, if you can get WASession via "WACurrentRequestContext value session" when you can store things there.


On 24 October 2011 15:53, Norbert Hartl <[hidden email]> wrote:
I need to provide some context to my magritte components and tried to use WADynamicVariable for it. But all the requests that are coming in are ajax requests. I've used the use:during: for the dynamic variable in the rendering of the topmost component. But the ajax requests seem to take another route making my usage of the dynamic var useless.

What would be the best extension point for injecting a block to make use of dynamic vars?

thanks,

Norbert_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



--
Milan Mimica
http://sparklet.sf.net

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Ajax and dynamic variables

Philippe Marschall
In reply to this post by NorbertHartl
2011/10/24 Norbert Hartl <[hidden email]>:
> I need to provide some context to my magritte components and tried to use WADynamicVariable for it. But all the requests that are coming in are ajax requests. I've used the use:during: for the dynamic variable in the rendering of the topmost component. But the ajax requests seem to take another route making my usage of the dynamic var useless.
>
> What would be the best extension point for injecting a block to make use of dynamic vars?

You can use something like the following to "copy" a dynamic variable
from the render to the action phase

| value |
value := MyDynamicVariable value.
html anchor
    callback: [
        MyDynamicVariable use: value during: [
            "actual callback code"] ]

(maybe it needs a value holder but I don't think so)

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Ajax and dynamic variables

NorbertHartl

Am 24.10.2011 um 16:31 schrieb Philippe Marschall:

> 2011/10/24 Norbert Hartl <[hidden email]>:
>> I need to provide some context to my magritte components and tried to use WADynamicVariable for it. But all the requests that are coming in are ajax requests. I've used the use:during: for the dynamic variable in the rendering of the topmost component. But the ajax requests seem to take another route making my usage of the dynamic var useless.
>>
>> What would be the best extension point for injecting a block to make use of dynamic vars?
>
> You can use something like the following to "copy" a dynamic variable
> from the render to the action phase
>
> | value |
> value := MyDynamicVariable value.
> html anchor
>    callback: [
>        MyDynamicVariable use: value during: [
>            "actual callback code"] ]
>
> (maybe it needs a value holder but I don't think so)
>
Ah, yes. The solution was too obvious for me to discover it. But now I see that this is not really a practical approach.

thanks,

Norbert

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside