sapui5 input validation using conditional combobox binding


1.sapui5 framework
2.basic javascript knowledge

What we are going to do is simple.We have two comboboxes.Based on first combobox value second combobox values should when value changes second combobox binding should change(dynamic binding).


1.Our odata should look like this.Here iam using custom data.Set data to the core so we can access it.

2.Create first combobox and bind data to it.Here is the tricky part.In the selectionchange event of combobox call a function for binding the secondcombo passing the selected key as parameter.

3.Function for binding second combobox.

4.You Should set initial binding of second combo by calling function passing 0 as parameter

5.All done.See it in action.I have shared jsbin code.(try to open in chrome if mozilla doesn't work)

If you enjoyed this post, I’d be grateful if you’d help it spread by sharing.Thank you! See you soon


Post a Comment

Powered by Blogger.