[Seaside] Feature or bug related to Canvas API's implementation of textInput (async edition)?

Ramon Leon ramonleon at cox.net
Thu Feb 1 17:15:02 UTC 2007


> I just happened to notice this when I had a breakpoint set inside a 
> liveCallback block such as below :
> 
> (html textInput) size: 5; value: ''; liveCallback: [ :value :r | 
> dosomething_here ]
> 
> I find that a breakpoint fires every time a character is typed into the 
> field.. I'm guessing (but haven't
> checked) that the javascript as part of SeasideAsync is hooked into the 
> javascript "onchange" event
> instead of a focus change..   Anyway, just thought I'd check to see if 
> this would still work if plugged
> into the focus change event instead without pestering Seaside for each 
> character.  Anyway, just
> thought I'd check..
> 
> Rick Flower wrote:

Another reason I prefer Scriptaculous, I decide what client side event 
fires my callback.  I can seamlessly compose new and unique solutions to 
problems by mixing and matching client side and server side code as if 
there weren't a difference.

(html textInput)
     id: #textId; size: 5; value: '';
     callback: [:value | self textId: value];
     onBlur: (html updater
                  triggerFormElement: #textId;
                  callback: [:ajax | dosomething_here ]

And the metaphor couldn't be simpler, it matches exactly how you'd 
program in javascript, you'd attach code to event handlers of html tags, 
just like here.



More information about the Seaside mailing list