210 likes | 334 Vues
This guide explores the process of modifying menu commands in EMC Documentum. You'll learn how to add, rearrange, and remove menu commands effectively. The presentation covers essential steps such as identifying configuration files, copying them to a custom directory, and editing elements like action menu items. With tips on refreshing configurations and customizing toolbars, you'll gain valuable insights into enhancing user experiences through tailored menu options. Join us as we demystify menu modification in EMC Documentum!
E N D
Grokking the ParadigmModifying Menus Dennis Dawson Principal Technical Writer EMC/Documentum
Here’s what I’m gonna talk about: Adding a menu command Rearranging commands Removing a menu command Ten Minutes’ Worth of Stuff Grokking the Paradigm
Remember... Magic is easy, once YOUknow the secret! Marshall Brodien Grokking the Paradigm
Overview • To modify menu commands we need to: • Identify the configuration file and JSP to modify • Copy the file to the custom/config directory • Edit the dmfx:actionmenuitem elements and attributes • Refresh the configuration • Similar to customizing the toolbar Grokking the Paradigm
Adding a Menu CommandIdentifying the Files to Modify • The “obvious” place to start is /webtop/config/menubar_component.xml • Copy to /custom/config/menubar_component.xml Grokking the Paradigm
Adding a Menu CommandIdentifying the Files to Modify Note the location of the menubar.jsp (so we can copy it) <component id="menubar" extends="menubar:/webcomponent/config/library/menubar/menubar_component.xml"> ... <pages> <start> /webtop/classic/menubar/menubar.jsp </start> </pages> ... </component> Grokking the Paradigm
Adding a Menu CommandIdentifying the Files to Modify • Change the extends attribute to point to the Webtop file we just copied. • Change the <start> page to a new custom page we’ll modify <component id="menubar" extends="menubar:/webtop/config/menubar_component.xml"> ... <pages> <start> /custom/menubar/menubar.jsp </start> </pages> ... </component> Grokking the Paradigm
Adding a Menu CommandIdentifying the Files to Modify • Copy /webtop/classic/menubar to the /custom directory Grokking the Paradigm
Adding a Menu CommandIdentifying the Files to Modify • menubar.jsp includes menubar_body.jsp <%@ page contentType="text/html; charset=UTF-8" %> <%@ page errorPage="/wdk/errorhandler.jsp" %> <%@ taglib uri="/WEB-INF/tlds/dmform_1_0.tld" prefix="dmf" %> <%@ taglib uri="/WEB-INF/tlds/dmformext_1_0.tld" prefix="dmfx" %> <%@ include file='/webcomponent/library/menubar/menubar_body.jsp' %> Grokking the Paradigm
Adding a Menu CommandIdentifying the Files to Modify • Menubar.jsp includes menubar_body.jsp • Copy the file from /webcomponent/library/menubar to /custom/menubar Grokking the Paradigm
Adding a Menu CommandIdentifying the Files to Modify • Edit /custom/menubar/menubar.jsp to include our custom menubar_body.jsp (same directory) <%@ page contentType="text/html; charset=UTF-8" %> <%@ page errorPage="/wdk/errorhandler.jsp" %> <%@ taglib uri="/WEB-INF/tlds/dmform_1_0.tld" prefix="dmf" %> <%@ taglib uri="/WEB-INF/tlds/dmformext_1_0.tld" prefix="dmfx" %> <%@ include file="menubar_body.jsp" %> Grokking the Paradigm
Adding a Menu Command • Adding a command to a menu (actionmenuitem) follows the same paradigm as adding an actionlink to the toolbar <dmfx:actionmenuitem dynamic="multiselect" name="file_rename" value="Rename" action="rename" /> Grokking the Paradigm
Adding a Menu Command • Slip the new item between the file_saveas command and file_checkin <dmfx:actionmenuitem dynamic='singleselect' id='file_saveas' name='file_saveas' nlsid='MSG_SAVE_AS' action='saveasxforms' showifinvalid='true'/> <!-- Added by Dennis Dawson 11-16-06 --> <dmfx:actionmenuitem dynamic="multiselect" id = "file_rename" name = "file_rename" value = "Rename" action = "rename" /> <dmfx:actionmenuitem dynamic='multiselect' name='file_checkin' nlsid='MSG_CHECKIN' action='checkin' showifinvalid='true'/> Grokking the Paradigm
Adding a Menu Command • The Rename command added to the File menu Grokking the Paradigm
Adding a Menu Command • Enabled when one or more items are selected Grokking the Paradigm
Moving a Menu Command • To move a menu command, change its position in the JSP <dmfx:actionmenuitem dynamic='singleselect' id='file_view' name='file_view' nlsid='MSG_VIEW_FILE' action='view' showifinvalid='true'/> <!-- Added by Dennis Dawson 11-16-06 --> <dmfx:actionmenuitem dynamic="multiselect" id = "file_rename" name = "file_rename" value = "Rename" action = "rename" /> <dmfx:actionmenuitem dynamic='singleselect' id='file_saveas' name='file_saveas' nlsid='MSG_SAVE_AS' action='saveasxforms' showifinvalid='true'/> Grokking the Paradigm
Moving a Menu Command • The Rename command in its new position Grokking the Paradigm
Removing a Menu Command • Comment out a command to remove it from the menu <% /* Removed by Dennis Dawson 11-16-06 <dmfx:actionmenuitem dynamic='multiselect' name='file_cancelcheckout' nlsid='MSG_CANCEL_CHECKOUT' action='cancelcheckout' showifinvalid='true'/> */ %> Grokking the Paradigm
Removing a Menu Command • The Cancel Checkout command removed Grokking the Paradigm
Multiplicitas Componatis Res Simplex • Taken as a whole, Webtop and WDK-based applications are intricate, multifaceted feats of programming • When you focus on any one element of the application, it’s easy to follow the logic and duplicate its behavior • Once you grok the paradigm, enhancing and customizing complex applications becomes a series of simple steps Grokking the Paradigm
Clarifications/comments?Please send them to:dawson_dennis@emc.comWDK Questions? Please visit:http://developer.emc.com/developer/