cancel
Showing results for 
Search instead for 
Did you mean: 

Restricting input field characters to be 10

Former Member
0 Kudos

Hi,

I am developing a WD Java application(NW 2004) in which user shud not be allowed to enter more than 10 chars in the InputField.

I don't want to check for maximum in a server event.

Also,if I use Simple Data type,I think it validates after a server trip.

To my understanding java script can not be used in Webdynro for JAVA.

If it is so,how can I perform the above task.

Any suggestions please..

Can we have any thing like onKeyPress etc..?

Thanks in Advance

Santhosh

Accepted Solutions (1)

Accepted Solutions (1)

sridhar_k2
Active Contributor
0 Kudos

Hi Santhosh,

You are true that, you can't use java script in Web Dynpro.

To restrict InputField,use Simple Type. It validates before Server Trip. If you are not sure, check by printing a message in that Event.

Create a Simple type(nameVar - Maximum Len 10) and assign it to the Context Variable, which is blinded to the Input Field. It restricts entering more than 10 chars.

Hope you understand this.

Regards,

Sridhar

Former Member
0 Kudos

Thanks a ton Sridhar,

I thought Simple Type validates after server trip

and didn't even try to test the same.

I tested it now..Its working fine...

Thanks again.

Regards,

Santhosh

Answers (0)