[Seaside] WATextInputTag & (deprecated) #exampleText:

Nick Ager nick.ager at gmail.com
Sun Mar 7 18:47:53 UTC 2010


Hi,

I've been using WATextInputTag>>exampleText in my Seaside 3.0 project.
However I've noticed that it's been deprecated with the message:
'Use an appropriate Javascript library instead.'.

I'm using jQuery libraries in my project so I set about trying to achieve
the same effect with jQuery. After a few less than promising attempts I've
ended up with:

input := html textInput on: #testInput of: self.
self testInput isEmptyOrNil ifTrue: [
input
style: 'color: #aaa';
value: self exampleText;
script:(html jQuery this one: 'focus' do: (html jQuery this value:''; cssAt:
'color' put: nil))

This appears to work, but isn't nearly as tidy as using the deprecated
#exampleText: api as:

html textInput
 on #testInput of: self;
 exampleText: self exampleText.

Some questions arise from this exercise:
  1) Is there a plan to provide an equivalent to #exampleText: for Seaside
3.0?
  2) What was wrong with the original implementation?
  3) Is there a better way of achieving a similar result in jQuery?

Thanks

Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20100307/f576c6fd/attachment.htm


More information about the seaside mailing list