...
It is also required to specify a createEvent on the menu structure item to populate the Ribbon Combo with options and to select the default value.
Code Block | ||
---|---|---|
| ||
akioma.customer.getRibbonComboOptions = function( self ) {
// get target
const oTarget = self.controller;
// get options
akioma.invokeServerTask(
{ name: 'Osiv.System.UiContextHandlingBT',
methodName: 'GetComboOptions'
}).done(function(oResult){
const oOptions = oResult.plcParameter.Options;
// oOptions will be an array of { key, hdl, image } format element properties
// add options to combo
if (oOptions)
oTarget.setComboOptions( oOptions);
if(oOptions.length > 0)
oTarget.optionSelected(oOptions[0].hdl);
})
}
|