-
31 Aug 2009 8:55 AM #11
Just used your code. Seems to work very well. Thanks. Wonder if there is an updated version. Is there? The only thing so far that I think I would change is to have the input cursor placed at the first type in char. For example, if the mask is "(999) 999-9999", I would have the input cursor positioned at the first "9", so the user can immediately start typing. This would be great functionality to have added to GXT. Thanks
-
1 Sep 2009 4:02 AM #12
I have not changed over the code that did not use it more. More if you have any idea or any contribution is welcome ..

-
1 Sep 2009 4:09 AM #13
nice Widget :-)
i have this questions:
1) is this also working in GXT 2.x?
2) is it not better to create it as a component plugin or not (so it can work with other types than String)This forum needs your help: you got hints from the community and now you have fixed your code? dont just reply with "now its fixed" or "i found the error"! please take the time to post also an detailed answer with the working code.
GreaseMonkey Script for a GXT-only Forum: it hides ExtJs here: New Posts • Search Results • Advanced Search form • Category overview http://www.extjs.com/forum/showthrea...041#post410041
-
1 Sep 2009 4:52 AM #14
I dont know too.. because I dont use more.. you can test?

-
1 Sep 2009 4:57 AM #15
Hi, Just wondering why you don't use the mask code anymore. Did you find what seems a better alternative? Thanks
-
15 Feb 2010 12:40 PM #16
Repaint mask
Repaint mask
Hi,
How I can refresh the mask of the TextFieldMask Object ? I tried using layout method in the contentpane, but not working...
-
15 Feb 2010 1:11 PM #17
-
13 Sep 2010 2:15 AM #18
checkVal() returns wrong position
checkVal() returns wrong position
Hello,
the checkVal() Method returns the wrong position. I added
a++;
before "return a;" to correct the position.
GXT Version: 2.2.0
Best Regards,
Jonas
-
10 Aug 2011 6:45 AM #19
For anyone stumbling across this - This solution will only work when the first editable character is in the second position. I have implemented a small fix that will handle the cases where the first editable character is in any position. Basically, the original code is always skipping over the a = i; because of the use of the break statements. I am using GXT Version 2.3.0
Code:private int checkVal(boolean allow) { String test = ""; if (getValue() != null) { test = getValue(); } int lastMatch = -1; int a = 0; for (int i = 0, pos = 0; i < len; i++) { if (tests[i] != null) { buffer[i] = settings.getPlaceHolder(); while (pos++ < test.length()) { String c = String.valueOf(test.charAt(pos - 1)); if (c.matches(tests[i])) { buffer[i] = String.valueOf(c); lastMatch = i; a = i; break; } } if (pos > test.length()) { a = i; break; } } else if (i != partialPosition) { try { char d = test.charAt(pos); if (buffer[i].equals(String.valueOf(d))) { pos++; lastMatch = i; } } catch (Exception e) { continue; } } } if (!allow && lastMatch + 1 < partialPosition) { setValue(""); clearBuffer(0, len); } else if (allow || lastMatch + 1 >= partialPosition) { writeBuffer(); if (!allow) { if (getValue() != null) { setValue(getValue().substring(0, lastMatch + 1)); } } } return a; }
-
11 Oct 2011 10:52 PM #20
Urgent: Does this plugin work in Mozilla 3.0.9?
Urgent: Does this plugin work in Mozilla 3.0.9?
This is a wonderful plugin! Noticed that it is compatible with Chrome and IE, however doesn't seem to work for mozilla (version 3.0.19). Will be greatful if you could help me out by providing the necessary code.
Awaiting your response....
Thanking you in advance,
Pavitra


Reply With Quote
