Name | Description | Group | Default | Visible | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
design [String] |
Design Design
|
Display | Auto | true | ||||||||||
enabled [boolean] |
Enabled Enabled |
Display | true | true |
Name | Description | Group | Default | Visible |
---|---|---|---|---|
onitemselect [ScriptText] |
On Item Select On Item Select |
Events | true |
Name | Parameters | Return |
---|---|---|
addHeaderButton [details] | buttonKey, buttonTitle, (showTitle), (icon), (buttonType) | void |
addItem [details] | buttonKey, itemKey, itemText, (itemIcon) | void |
getHeaderClicked [details] | String | |
getHeaderKeyClicked [details] | String | |
getItemClicked [details] | String | |
getItemKeyClicked [details] | String | |
removeAllButtons [details] | void | |
removeAllItems [details] | buttonKey | void |
removeHeaderButton [details] | buttonKey | void |
removeItem [details] | buttonKey, itemKey | void |
Name | Description | Group | Default | Visible |
---|---|---|---|---|
itemConfig [String] |
Item Config Item Config |
Display | false | |
selectedHeader [String] |
Selected Header of Item Selected Header of Item |
Display | false | |
selectedHeaderKey [String] |
Selected Header Key of Item Selected Header Key of Item |
Display | false | |
selectedItem [String] |
Selected Item Selected Item |
Display | false | |
selectedItemKey [String] |
Selected Item Key Selected Item Key |
Display | false |
void addHeaderButton |
Add a header button Add or update a header button by key 'MENU'. FIORITOOLBAR_1.addHeaderButton("MENU","Menu",false,"sap-icon://menu2","Emphasized");
|
||||||||||||||||||
Source Code |
var o = eval(this.itemConfig); var matchIndex = -1; var sTitle = true; if(showTitle != undefined) sTitle = showTitle; var h; for(var i=0;i<o.length;i++){ if(o[i].key == buttonKey) matchIndex = i; } if(matchIndex==-1) { o.push({ key : buttonKey, text : buttonTitle, showTitle : sTitle, icon : icon, items : [], type : buttonType || "Default" }); }else{ // Don't overwrite items o[matchIndex].text = buttonTitle; o[matchIndex].showTitle = sTitle; o[matchIndex].icon = icon; o[matchIndex].type = buttonType || "Default"; } itemConfig = JSON.stringify(o); |
||||||||||||||||||
void addItem |
Add an item to a header button. Will add the header button if it does not yet exist. Add an item called 'Help' to header button with key 'MENU' with an icon sys-help-2 FIORITOOLBAR_1.addItem("MENU", "help", "Help", "sap-icon://sys-help-2");
|
||||||||||||||||||
Source Code |
var o = eval(this.itemConfig); var matchIndex = -1; for(var i=0;i<o.length;i++){ if(o[i].key == buttonKey) matchIndex = i; } if(matchIndex == -1 ){ // Add section for the lazy this.addHeaderButton(buttonKey, buttonKey); o = eval(this.itemConfig); matchIndex = o.length-1; } o[matchIndex].items.push({ key : itemKey, text : itemText, icon : itemIcon || "" }); itemConfig = JSON.stringify(o); |
||||||||||||||||||
String getHeaderClicked |
Get header of and item clicked. |
||||||||||||||||||
Source Code | return this.selectedHeader; | ||||||||||||||||||
String getHeaderKeyClicked |
Get header key of and item clicked. |
||||||||||||||||||
Source Code | return this.selectedHeaderKey; | ||||||||||||||||||
String getItemClicked |
Get item clicked. |
||||||||||||||||||
Source Code | return this.selectedItem; | ||||||||||||||||||
String getItemKeyClicked |
Get item key clicked. |
||||||||||||||||||
Source Code | return this.selectedItemKey; | ||||||||||||||||||
void removeAllButtons |
Remove All Button Remove all button FIORITOOLBAR_1.removeAllButtons(); |
||||||||||||||||||
Source Code | itemConfig = JSON.stringify([]); | ||||||||||||||||||
void removeAllItems |
Remove All Items in a header button Remove all items in header button 'MENU' FIORITOOLBAR_1.removeAllItems("Menu");
|
||||||||||||||||||
Source Code |
var o = eval(this.itemConfig); var matchIndex = -1; for(var i=0;i<o.length;i++){ if(o[i].key == buttonKey) matchIndex = i; } if(matchIndex>-1) o[matchIndex].items = []; itemConfig = JSON.stringify(o); |
||||||||||||||||||
void removeHeaderButton |
Remove a button Remove a header button with key 'MENU' FIORITOOLBAR_1.removeHeaderButton("MENU");
|
||||||||||||||||||
Source Code |
var o = eval(this.itemConfig); var matchIndex = -1; for(var i=0;i<o.length;i++){ if(o[i].key == buttonKey) matchIndex = i; } if(matchIndex>-1) o.splice(matchIndex,1); itemConfig = JSON.stringify(o); |
||||||||||||||||||
void removeItem |
Removes an item from a header button. Remove an item with key 'HELP' from header button with key 'MENU' FIORITOOLBAR_1.removeItem("MENU", "HELP");
|
||||||||||||||||||
Source Code |
var o = eval(this.itemConfig); var matchIndex = -1; for(var i=0;i<o.length;i++){ if(o[i].key == buttonKey) matchIndex = i; } if(matchIndex != -1 ){ var items = o[matchIndex].items; var itemIndex = -1; for(var i=0;i<items.length;i++){ if(items[i].key == itemKey) itemIndex = i; } if(itemIndex>-1) items.splice(itemIndex,1); itemConfig = JSON.stringify(o); } |
||||||||||||||||||