[Seaside] new release of Seaside integration for JQueryMobile

Nick Ager nick.ager at gmail.com
Thu Oct 27 07:07:09 UTC 2011


Hi Marten,

Ok, I have found a way to do it - but actually how do I force a refresh of
> my screen ...
>
> | ajaxFunction |
>
> ajaxFunction := (html jQuery ajax
>  dataType: 'script';
>  callback: [ :v | ... action in smalltalk ... ]
>  value: (Array with: (JSStream on: 'arguments[0]'));
>  async: false) asFunctionNamed: 'swipeLeft' arguments: #(e).
>
>
> html
>  script: ajaxFunction.
>
> html image
>  width: '100%' ;
>  onSwipeLeft: 'swipeLeft("swipeLeft")';
>  url: link].
>
> I get Smalltalk called - but the screen content is NOT refreshed !
>
> Marten
>
> Am 27.10.2011 07:49, schrieb Marten Feldtmann:
>
>> Is something possible like:
>>
>>
>> html heading
>> level4;
>> onSwipeLeft: [ .... ]
>>
>

I released another version last night (Pharo and VASt), which fixes some
bugs we found associated with event handling, so it would be worthwhile
downloading that version.

Have you seen the event handling samples:
http://jquerymobile.seasidehosting.st/seaside/javascript/jquery-mobile/Events


(click on: Element scoped events->Touch events)

I've also added some examples of using Ajax to update:
http://jquerymobile.seasidehosting.st/seaside/javascript/jquery-mobile/Ajax-forms
The example titled "check box version 2" most closely resembles your
use-case.

In your specific example you could try something like:

html heading
   level4;
   onSwipeLeft:
      (html jQuery ajax
            callback: [ :val | "val will contain 'swipeLeft' ]
            value: 'swipeLeft';
            script: [ :s | s << (s jQuery id: idOfElementToUpdate) text:
'updated text' ]).

IIUC you missed off a call to #script: which all actually perform the
update.

Hope this helps

Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20111027/5c5e0774/attachment-0001.htm


More information about the seaside mailing list