Skip to Content
0

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

Jun 30, 2017 at 09:39 AM

158

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Sharath M G Jul 17, 2017 at 07:22 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded