on 10-17-2008 1:27 PM
Hi
I have a input field with label MILES where it should accept only numeric values(like 12,145.345,0.3435...)can you please tell how to write validation for this
Thanks
Raju
Hi,
Create this input type as integer and format it as per your requirement
Either create a dictionary type and specify the format
or else use the DecimalFormat
Ex:
DecimalFormat decimalFormat = new DecimalFormat( "#,###,###,##0.00" );
double val= 100.23297;
System.out.print(decimalFormat.format(val));
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raju,
Create a context attribute and select "type" property of the attribute as integer from the drop down.
On the Layout tab create an input field and map the input field's value property to this context attribute.
Create an action button say Save and write the save code on its action.
Now if you put alphabets or alphanumeric value in the input field and click on save button the input field will come in red and message will be displayed "Value contains non-numeric charcters". This is a built - in numeric check in Dynpro.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.