cancel
Showing results for 
Search instead for 
Did you mean: 

Validation Bug - Decimal Type

Former Member
0 Kudos

Can anyone tell me why typing in a non-numeric character into an Input Field of type decimal causes a java.lang.NullPointerException during validation, rather then giving an incorrect data message? Is there a work around for this bug. I wanted to make sure it wasnt just my own app, so I checked in ESS with the same results.

Thanks, Kevin

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

That sounds like a bug in the Java data dictionary. Open an OSS message. A workaround could be realized using a calculated attribute where you parse the input in the set-method.

Armin

Answers (2)

Answers (2)

Former Member
0 Kudos

I am using Version: 2.0.14

I havent made any adjustments to the Library at all. I simply create a new Value Attribute of simple type decimal in the Context. I set the value of an input field to use this attibute. Then When I run the application, I type "99ggghh" into the field and I will get the null error.

I have come up with a workaround though, I set the attribute to type String and then validate as a decimal myself and it seems to work just fine.

Former Member
0 Kudos

Nevertheless, please open the OSS message to fix this asap.

Armin

Former Member
0 Kudos

Will do. Thanks Armin!

Former Member
0 Kudos

I tried using get/set but the input validation is done before any other methods are called, and I get the null pointer exception everytime.

This would appear to be a pretty big Bug, but I am unable to find any reference to it during any of my searches.

Is there a way to call a method before the field validation or some way to modify the validation in order to fix this?

Thanks,

-Kevin

Former Member
0 Kudos

Kevin,

How is your decimal type setup in the dictionary? What values did you use for Total Digits and Fraction Digits, anything entered in the Representation tab, etc.?

I tried it out and it works fine (gives a normal validation error messag like 'Please give value in form -2,733.34'. Also, what version are you running? I tried it in NW04 SP 11.

-Cindy