You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a formatted text field and a mask applied to it.
when typing numbers in the field the typed number fields will appear randomly in RAP..
To give more context of the behaviour
for example i have a mask applied to the field
(###) ### - #### and I have numbers partially filled (123) 4- and try to insert a 5 (i.e. (1235) 4 before it corrects the value) this is the input to MaskFormatter.insetText(String txt, int start)
In Non-RAP this is working fine number 5 entering to the right mask (123) 45 cursur position is 4
but this is not the case in RAP the number 5 entering to (1235) 4 cursor position is 0
In Non-RAP it is reconciling 1 character at a time but in RAP it is trying to do it with the whole string.
The text was updated successfully, but these errors were encountered:
public class MaskFormatter {
public static void main(String[] args) {
Display display = new Display();
Shell shell = new Shell(display);
shell.setLayout(new GridLayout());
Locale.setDefault(Locale.US);
FormattedText text = new FormattedText(shell, SWT.BORDER | SWT.RIGHT);
text.setFormatter(new MaskFormatter("(###) ###-###"));
GridData data = new GridData();
data.widthHint = 100;
text.getControl().setLayoutData(data);
shell.open();
while ( ! shell.isDisposed() ) {
if (!display.readAndDispatch()) display.sleep();
}
display.dispose();
}
I have a formatted text field and a mask applied to it.
when typing numbers in the field the typed number fields will appear randomly in RAP..
To give more context of the behaviour
for example i have a mask applied to the field
(###) ### - #### and I have numbers partially filled (123) 4- and try to insert a 5 (i.e. (1235) 4 before it corrects the value) this is the input to MaskFormatter.insetText(String txt, int start)
In Non-RAP it is reconciling 1 character at a time but in RAP it is trying to do it with the whole string.
The text was updated successfully, but these errors were encountered: