refreshMenuItems();
The refreshMenuItems method refreshes items of the panel name menu in the selection wizard.
A menu for the panel name in the selection wizard may look as follows:
This method makes incorrect menu items unavailable.
Executing the example requires that the HTML page contains the ExpressBox component named expressBox (see Example of Creating the ExpressBox Component). Refresh items of the menu for the wizard panel name:
var dimBarMaster = expressBox.getPropertyBarView().getDimBarMasterView(); // Show panel dimBarMaster.show(); // Panel index var itemIndex = 0; var hlDim = dimBarMaster.getId(itemIndex); // Get first dimension key var dimKey = dimBarMaster.getCurrentState().dims.its.it[0].k; var masterPanel = dimBarMaster.getPanelByDimKey(dimKey); // Get panel data source var source = masterPanel.getSource(); console.log("Key: " + source.getKey() + ", Name: " + source.getName()); var items = masterPanel.getHeaderControl() .getMenu() .getItems(); for (var i = 0; i < items.length; i++) { items[i].setEnabled(true); } alert("All menu items become available"); masterPanel.refreshMenuItems();
All menu items become available after an appropriate message is shown:
The browser console displays key and name of the dimension with which the user is working:
Key: 2038, Name: Calendar
After clicking the OK button the menu for the wizard panel name is refreshed: that is, incorrect menu items become unavailable:
See also: