Input masking on Text [message #900399] |
Mon, 06 August 2012 21:00  |
Eclipse User |
|
|
|
Has anybody tried to add input masking on a Text widget?
There seems to be a lack of documentation for creating custom widgets for RAP 1.5. I've also read there can be issues taking the easy route of creating Browser based widgets when using the SimpleLifeCycle.
I've bad a look at the Nebula port of the Date combo and server-side input masking doesn't work very well, even with the browser on the same machine as the server (I assume because Modify listeners are always triggered after a delay).
It was fairly easy to shove a jQuery input mask library on a GWT component but I imagine it wouldn't be so simple with RAP.
Is there an easy way to subclass Text, add a property to hold the mask and some javascript to initialise the widget?
|
|
|
Re: Input masking on Text [message #900432 is a reply to message #900399] |
Tue, 07 August 2012 05:45   |
Eclipse User |
|
|
|
Hi Chris,
did you try SWT.PASSWORD style flag on the Text widget?
HTH,
Ivan
On 8/7/2012 12:00 AM, Chris Fairhall wrote:
> Has anybody tried to add input masking on a Text widget?
>
> There seems to be a lack of documentation for creating custom widgets
> for RAP 1.5. I've also read there can be issues taking the easy route
> of creating Browser based widgets when using the SimpleLifeCycle.
>
> I've bad a look at the Nebula port of the Date combo and server-side
> input masking doesn't work very well, even with the browser on the
> same machine as the server (I assume because Modify listeners are
> always triggered after a delay).
>
> It was fairly easy to shove a jQuery input mask library on a GWT
> component but I imagine it wouldn't be so simple with RAP.
>
> Is there an easy way to subclass Text, add a property to hold the mask
> and some javascript to initialise the widget?
--
Ivan Furnadjiev
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
|
Re: Input masking on Text [message #900628 is a reply to message #900432] |
Tue, 07 August 2012 20:17   |
Eclipse User |
|
|
|
Sorry, I could have phrased my question better.
When I said input mask I meant something like this: http://digitalbush.com/projects/masked-input-plugin/
I've tried slightly modifying that script to fire the input's listeners when it intercepts the key events but its only working on IE. In Firefox none of the listeners RAP adds to the input field get fired so the widget is effectively broken.
It works surprisingly well on IE7
|
|
|
|
Powered by
FUDForum. Page generated in 0.03346 seconds