[Seaside] passing additional parameters to an anchor callback

Johan Brichau johan.brichau at uclouvain.be
Mon Oct 5 20:20:03 UTC 2009


Hi Lukas,

You mean like the code below? That would indeed avoid to put the  
values in a component instance variable.
So there's no mechanism to pass those directly to the callback then? I  
assume that if the ajax call was not received (and answered) by the  
seaside application that the webbrowser will not execute the anchor  
link? (I should check that...)

Thanks for the suggestion!

| tempvalues |
html anchor
        onClick: (html jQuery ajax
                                trigger: [ :values | tempvalues :=  
values ]
                                passengers: (html jQuery ...));
        callback: [ ... does something with tempvalues .... ];

On 05 Oct 2009, at 21:56, Lukas Renggli wrote:

> Hi Johan
>
> If you use a closure enabled Pharo image you might use method temps.
> It also works in non-closure images but there you need to pass the
> value through a value-holder.
>
> Lukas
>
> On Monday, October 5, 2009, Johan Brichau  
> <johan.brichau at uclouvain.be> wrote:
>> Hi,
>>
>> I am looking for a way to pass additional data in an anchor  
>> callback. Is that possible?
>>
>> In the application I am building, there is a fair amount of  
>> javascript behavior on the client side and I often need to pass  
>> some javascript values when requests need to go back to the Seaside  
>> server application. In the particular code snippet below, I achieve  
>> this functionality by passing those values via an ajax call and  
>> have the callback block use those values. However, I'm not fond of  
>> that code since the values are required in the callback and not in  
>> the components themselves.
>>
>> So my question is: can I make the callback block be called with  
>> values in the same way that I can pass on values to an ajax call  
>> (as in #callback:values:).
>> Or am I seeing this completely wrong and is there a better way?
>>
>> html anchor
>>        onClick: (html jQuery ajax
>>                                trigger: [ :values | .... sets the  
>> values in the components ... ]
>>                                passengers: (html jQuery ...));
>>        callback: [ ... does something that needs the values .... ];
>>
>> ----------------------------
>> Johan Brichau
>> johan.brichau at uclouvain.be
>>
>>
>>
>>
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>
> -- 
> Lukas Renggli
> http://www.lukas-renggli.ch
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

----------------------------
Johan Brichau
johan.brichau at uclouvain.be






More information about the seaside mailing list