Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

To create a ribbon combo you need to create a new Menu Function with the type Akioma.Swat.Studio.Menu.DynCombo.

Set the newly created Function for your required menu structure item.


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.



akioma.customer.getRibbonComboOptions = function( self ) {
	// get target
	const oTarget		= self.controller;
	// get options
	akioma.invokeServerTask(
			{ name: 'Osiv.System.UiContextHandlingBT',
			 methodName: 'GetComboOptions'
			}).done(function(oResult){
				deferred.resolve(oResult.plcParameter.Value);
				const oOptions = oResult.plcParameter.Options;
				// oOptions will be an array with { key, hdl, image } element properties
		
				// add options to combo
				if (oOptions)
					oTarget.setComboOptions( oOptions);

				if(oOptions.length > 0)
					oTarget.optionSelected(oOptions[0].hdl);
			})


	
	
}


  • No labels