Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Personas 3 SP3: Performance of dependent dropdowns

Hi there,

We are on Personas 3, SP3.

I have created couple of custom combo boxes, where drop down values in second combobox depends on what was selected in first combo box.

All the dropdown values (for both the combo boxes) are loaded when the screen is initially loaded. Upon a value is selected in combobox 1 (onSelect event), I calculate the dropdown values for the second dropdown and update the combobox entries.

Below is the event handler for 'onSelect'

//Clear Current entries of second combobox

var damageCombo = session.findById("wnd[0]/usr/cmbPersonas_146789411528788");

var damageCodes = damageCombo.entries;

damageCodes.removeAll();

//New selected Key from the first combobox

var damageCodeGroup = newKey;

if (damageCodeGroup === ""){

  return;

}

//Previously loaded data

var allDamageCodes = session.utils.get("damage_codes");

var data = JSON.parse(allDamageCodes);

//Calculate the values for second dropdown

for (var i=0; i<data.length; i++){

  if (data[i].KEY === damageCodeGroup){

       var values = data[i].SUBKEYS;

       for (var j=0; j<values.length; j++){

            damageCodes.add(damageCodes.createComboBoxEntry(values[j].KEY, values[j].VALUE));

       }

  break;

  }

}

//Assign it to second combobox

damageCombo.entries = damageCodes;

When I select a value in first combobox, it takes up to 4 seconds for the screen to be ready for input. Since I have all the value at client side, I did not expect this. In the network tab I see that there are three calls to the server.

How can I get rid of this 4 seconds delay? Am I doing anything wrong?

Regards

Krishna

Tags:

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question