[Seaside] Little help for callback: value:

Lukas Renggli renggli at gmail.com
Tue Feb 9 12:47:35 UTC 2010


> Try
>
> value: (SUStream on: 'alert("test")')

Yes in Seaside 2.8 this is required. In Seaside 3.0 your attempt would
have worked too.

Lukas


>
> Gerhard
>
> On Tue, Feb 9, 2010 at 12:31 PM, Marco D'Ambros <marco.dambros at usi.ch>
> wrote:
>>
>> Ok, thanks.
>> Now, considering the following code snippet:
>>
>> (html submitButton)
>>        onClick: ((html evaluator)
>>                callback: [:value | self halt.]
>>                value: 'alert(''test'');');
>>        text: 'Submit'
>>
>> if I understood correctly, when the button is pressed the javascript is
>> executed and the result of the execution is sent back to the callback block.
>> However, when I click the button the javascript is not executed, as the
>> Alert('test') does not appear.
>>
>> Cheers,
>> Marco
>>
>>
>>
>> On Feb 9, 2010, at 12:17 PM, Lukas Renggli wrote:
>>
>> >> I am trying to use
>> >>
>> >> SUEvaluator >> callback: value:
>> >>
>> >> to do it. The idea was to put the evaluation of the javascript command
>> >> in the value part and pass its result to the callback. However, I am not
>> >> sure whether this is the right way to go..
>> >> Could you give me some suggestion on how to implement this?
>> >
>> > That's definitely the right way. You need to consider that the
>> > Javascript code that is used to calculate the value should be a
>> > string, because it will be put into the request URL of the evaluator.
>> > Have a look at the senders of #callback:value: there are several
>> > examples where values are concatenated in Javascript and split again
>> > in Smalltalk.
>> >
>> > Lukas
>> >
>> > --
>> > Lukas Renggli
>> > http://www.lukas-renggli.ch
>> > _______________________________________________
>> > 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
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>



-- 
Lukas Renggli
http://www.lukas-renggli.ch


More information about the seaside mailing list