SeasideAsync and scriptaculos

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

SeasideAsync and scriptaculos

dtrussardi@tiscali.it
Hi,
 
i use seasideAsync liveCallback to intercept the change ( at character level )  in one textInput and dinamic update an list based on it value.
 
html textInput
    value: field
    callback:[ :v| field := v].
    liveCallback:[:text :h| field:= text.
                                    h div: 'idToUpdate' with: queryMethodBasedOn_Field: h].
 
 
 
Now i port my code into Gemstone, and i think to use only scriptacolous for do it.
 
I think it's not possible use together  ( SeasideAsync and scriptaculos)  in the same render code.
And i'm interested to conform, standarize the code.
 
 
 
 
What's the right method to do it ?
 
I tested :
 
html textInput
  id: (inputId := html nextId);
  exampleText:  'testo iniziale';
  callback: [ :value | self field: value ];

  onEnter: ( html updater id: 'idToUpdate' ;
       callback:[ :h| self queryMethodBasedOn_Field: h ]).
      
 html div id:'idToUpdate' ;  with:[ self queryMethodBasedOn_Field: html].
 
 
With this code  i d'ont intercept the character change, but only at Enter level and the field is'not update.
 
 
How i can intercept the change at character level, in the textInput and update the relative field?
And after update the list ?

Any pointers would be greatly appreciated!

Thanks!

Dario


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

Re: SeasideAsync and scriptaculos

Lukas Renggli
> html textInput
>   id: (inputId := html nextId);
>   exampleText:  'testo iniziale';
>   callback: [ :value | self field: value ];
>
>   onEnter: ( html updater id: 'idToUpdate' ;
>        callback:[ :h| self queryMethodBasedOn_Field: h ]).
>
>  html div id:'idToUpdate' ;  with:[ self queryMethodBasedOn_Field: html].

You need to trigger the callback of the textInput. So your updater
should look like:

html updater
     id: 'idToUpdate';
     triggerFormElement: inputId;
     callback: ...

Scriptaculous gives you a lot of freedom, but you have to take care of
a few more things to get that freedom ...

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside