Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 10116

Re: Ive two combo boxes(cascaded) if i click directly on second combo box it should display error message like "Please Select 1st Combo Box" Please Help  me Out

$
0
0

I don't understand: If you're able to detect an empty selectedKey() for the current combobox, then i don't understand why you couldn't do it for the other combobox, and thus solving your problem.......?

 

In the second combobox, modify the 'change' event handler to:

            change:function(){

                if (mirCategoryCombo.getSelectedKey() == null || mirCategoryCombo.getSelectedKey == "") {

                     // your alert here

                 }

                 else {

                    if(this.getSelectedKey()=="" || this.getSelectedKey()==null){

                        this.setValueState(sap.ui.core.ValueState.Error);

                        raiseNotification(5,20019,"","","","","I");

                    }else{

                        this.setValueState(sap.ui.core.ValueState.None);

                    }

                    mirController.mirEmptyProductControls("mirProductGroupCombo");

               }

 

but I think a much better UX would be to simply disable the 2nd combobox if nothing is selected in the 1st combobox, and enable it once you have selected something in the 1st combobox.


Viewing all articles
Browse latest Browse all 10116

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>