cancel
Showing results for 
Search instead for 
Did you mean: 

InputField validation

former_member206159
Active Contributor
0 Kudos
59

Hi Experts,

I have one input field  which is bounded to an attribute.  Also a simple type(decimal with exactly two decimals) is assigned to that attribute.

Now when user enters 123.12 and on click of any action , it is working fine.

If user gives 123.123 then on click of any action , webdynpro standard validation erro message is coming and no action performed. This is also correct.

But when I set the value from the code(set Attribute), it is taking any value and on any action , I am not getting, webdynpro standard error message at all. and action is perofrming.

As an example, if a set the value(to that attribute), as 123.123 from the code, then on action , I am not getting webdynpro standard message and also action is performing without any validation.

Can anyone please let me know why validation is not happening if we set the value from the code.

Thanks&Regards,

Raghu

Accepted Solutions (0)

Answers (2)

Answers (2)

mangesh_sonawane
Participant
0 Kudos

Hi

Which msg is coming can u tell?

First u dont have to set any value it will be set automatically when u enter in input field.

Dont set any value and then try?

Thanks & Regards,

Mangesh Sonawane.

former_member206159
Active Contributor
0 Kudos

Hi Mangesh,

I think you have not understood my problem.

In general if we use simpletype (as an example simpletype as decimal), then if you enter characters in that input field then on any click of any action buttoon, webdynpro will throw standard erro message like "Please enter in the format -2733.34" kind of message.

But if you set the value from code(like set attributename()), then we are noit getting webdynpro standard message.

I want to know why it is not coming in second case.

Thanks&Regards,

Raghu

Former Member
0 Kudos

HI.

What is the built-in type of the simple type. ?

How you are setting the value to the context attribute.? Which data type you are using for the value 123.123 while setting it to the context in code?

Regards,

Sambaran

former_member206159
Active Contributor
0 Kudos

Hi Chakrabotrhy,

Simpletype is of deciaml  with 2 decimal places. and we also defined the format.

I am settin gthe value to the attributlike below.

suppose the attribure name is amount.... I am setting it as  setAmount(123.123);

Raghu