SharePoint Ribbon Deep Dive
- 14. Advantages Disadvantages
• Easy to create • If complex, hard to manage
• Easy to manage • Lots of JavaScript can be
• Great for simple commands hard to manage
• Not cached on the client
• Not reusable outside of the
definition
- 15. Advantages Disadvantages
• External JS library • Poor JavaScript dev tools
• Easier to manage & debug • Must be added to the page
• Can be minified • More work (build, register &
• Allows for greater control initialize on page)
over commands • All OO JavaScript
• Enable/disable command
• Block loss of focus
• Reusable across
customizations
- 16. Global Commands Focused Command
• Always available when on a • Only available at specific times,
page e.g. when web part has focus
• (if CanExecute says it is • Example: Content Editor Web
available) Part controls
- 20. SplitButton ToggleButton Spinner
• Easy default plus • Off or on • Select within a
sub-menu range
- 29. Server side:
SPRibbon.MakeTabAvailable For contextual tab
SPList.UserCustomActions Target an individual list
JavaScript:
RefreshCommandUI() Refresh ribbon, e.g. in async
callback
SP.SOD.ExecuteOr Deal with JS dependencies
DelayUntilScriptLoaded()
Editor's Notes
- Parent control won’t appear.Error “MenuSections can only have children of type MenuItem, Gallery or GroupPopup. - will get error below”No options appearOtherwise no options appear!