cancel
Showing results for 
Search instead for 
Did you mean: 

Validation for Input Field & dropDown

Former Member
0 Kudos

Hi,

I want to put validation in input field and dropdown box by index.In Input Field it should be only contains Number,there will be no alphabets and special characters in it.

For dropdown box, it should not be empty selected, there should be atleast one selected item.

How can I do validation in it? please provide me the code

Regards

Manish

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

HI manish,

For input field, create a simple type of type integer in dictionaries->data types-> Simple types .Create a context attribute of ur custom simple type & bind it to the input field.

For dropdown , just change the selection property of the node to 1.n.

regards

Sumit

Former Member
0 Kudos

hi sumit

In which property of Input Field I can bind attribute. please explain it..

Thanks & regards

'Manish

Former Member
0 Kudos

Hi,

There is a property called value for the inputfield. Bind the attribute to this property.

thanks & regards,

Manoj

Former Member
0 Kudos

Hi Manoj

If i bind this attribute to value property then How can I retrieve data from BAPI and same with the Dropdown box case.

Please explain me in detail so that I can understand easily.

Former Member
0 Kudos

Hi,

You should have told this that the data is getting auto-populated.

One solution is that you can make the inputField as readOnly. If the type of the attribute is integer

then it will be validated automatically by the framework for non-numeric and empty values.

For dropdown you can always check with the attribute mapped to dropdown if it is null or not.

thanks & regards,

Manoj

Former Member
0 Kudos

HI Manish,

What do u exactly mean by "If i bind this attribute to value property then How can I retrieve data from BAPI " ???

Its value property of the input field, its not a value node or attribute. If u r using model nodes & attributes, just check there will a simple type automatically created, when u create the model from the bapi.

In case its not numaric, create a value node & attribute, follow the steps i have told earlier, copy the data from model node to value node .

regards

Sumit