cancel
Showing results for 
Search instead for 
Did you mean: 

sap.m.ComboBox selectionChange in the next view doesn't get triggered

Former Member
0 Kudos

Hi Experts,

Request you kindly look into below SAPUI5 issue and let me know what went wrong.

I am calling below function (onChangeCombo1) for selectionchange event for the combobox but in the application when I move to the next week as shown in the screenshots, although there is no value in the combobox but whenever I paste the same value as of the previous week (Ex: FT0830-1800) , the combobox selectionchange event is not triggered. But if the value is different (Ex: FT0800-1730), the event is being triggered. Let me know what needs to be done in order to trigger the selectionchange event.

Function for selectionChange:

// function called on ComboBox Day1 changed
  onChangeCombo1:function(oEvent){
    var seletecedHrs = oEvent.mParameters.selectedItem.getBindingContext().getProperty().Sollz;
    var tableIndex = oEvent.mParameters.id.slice(44);


    var labelId = "ZAttendence--lableVal1-ZAttendence--tableId-"+tableIndex;
    sap.ui.getCore().byId(labelId).setText(seletecedHrs);


    var selectedTprog = oEvent.mParameters.selectedItem.getBindingContext().getProperty().Tprog;
    var falselabelId = "ZAttendence--falselableVal1-ZAttendence--tableId-"+tableIndex;
    sap.ui.getCore().byId(falselabelId).setText(selectedTprog);
  },

view.xml:

<VBox>

            <ComboBox id="comboBox1" selectionChange="onChangeCombo1" change="onChangeCombo1" class="comboCss"/>            
            <Label id="falselableVal1" visible="false"/>
            <Label id="lableVal1" class="labelCss"/>
</VBox>

First week

Next week

Accepted Solutions (0)

Answers (1)

Answers (1)

Sharathmg
Active Contributor
0 Kudos

Try to remove the id of combo box. It may be getting replicated and may not recognize the event unless the value is changed.

Try the event change instead of selection change.

Regards,

Sharath