smart gwt allow only numbers in textfield
smart gwt allow only numbers in textfield
Aceptar solo numeros en un textfield en gwt smartclient
very simple MASK PROPERTY
check4.setName("4");
check4.setTitle(" Grupo");
check4.setTitleOrientation(TitleOrientation.TOP);
check4.setWidth(100);
check4.setValue(false);
check4.setMask("###");
smart gwt allow only numbers in textfield
Aceptar solo numeros en un textfield en gwt smartclient
void com.smartgwt.client.widgets.form.fields.TextItem.setMask(String mask)
Input mask used to filter text entry.
Sample masks:
Any character not matching one of the above mask characters or that is escaped with a backslash (\) is considered to be a literal.
Custom mask characters can be defined by standard regular expression character set or range. For example, a hexadecimal color code mask could be:
Note that the current value of the field is cleared when changing the mask.
Note : This is an advanced setting
Aceptar solo numeros en un textfield en gwt smartclient
very simple MASK PROPERTY
- TextItem phoneNumberField = new TextItem("phoneNo", "Phone No.");
- phoneNumberField.setMask("(###) ###-####");
- phoneNumberField.setHint("<nobr>(###) ###-####</nobr>");
check4.setName("4");
check4.setTitle(" Grupo");
check4.setTitleOrientation(TitleOrientation.TOP);
check4.setWidth(100);
check4.setValue(false);
check4.setMask("###");
smart gwt allow only numbers in textfield
Aceptar solo numeros en un textfield en gwt smartclient
void com.smartgwt.client.widgets.form.fields.TextItem.setMask(String mask)
Input mask used to filter text entry.
Sample masks:
- Phone number: (###) ###-####
- Social Security number: ###-##-####
- First name: >?<??????????
- Date: ##/##/####
- State: >LL
Character | Description |
---|---|
0 | Digit (0 through 9) or plus [+] or minus [-] signs |
9 | Digit or space |
# | Digit |
L | Letter (A through Z) |
? | Letter (A through Z) or space |
A | Letter or digit |
a | Letter or digit |
C | Any character or space |
< | Causes all characters that follow to be converted to lowercase |
> | Causes all characters that follow to be converted to uppercase |
Any character not matching one of the above mask characters or that is escaped with a backslash (\) is considered to be a literal.
Custom mask characters can be defined by standard regular expression character set or range. For example, a hexadecimal color code mask could be:
- Color: \#>[0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F]
keyPressFilter
. Set the mask for this item. Note that the current value of the field is cleared when changing the mask.
Note : This is an advanced setting
- Parameters:
- mask mask to apply to text item. Default value is null
- See Also:
- Text - Masked Example
Comments
Post a Comment