[Seaside] WATextInputTag & (deprecated) #exampleText:
nick.ager at gmail.com
Sun Mar 7 18:47:53 UTC 2010
I've been using WATextInputTag>>exampleText in my Seaside 3.0 project.
However I've noticed that it's been deprecated with the message:
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: [
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:
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
2) What was wrong with the original implementation?
3) Is there a better way of achieving a similar result in jQuery?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside