1 / 21

Grokking the Paradigm Modifying Menus

Grokking the Paradigm Modifying 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. Remember. Magic is easy, once YOU know the secret!

irisa
Download Presentation

Grokking the Paradigm Modifying Menus

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Grokking the ParadigmModifying Menus Dennis Dawson Principal Technical Writer EMC/Documentum

  2. 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

  3. Remember... Magic is easy, once YOUknow the secret! Marshall Brodien Grokking the Paradigm

  4. 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

  5. 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

  6. 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

  7. 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

  8. Adding a Menu CommandIdentifying the Files to Modify • Copy /webtop/classic/menubar to the /custom directory Grokking the Paradigm

  9. 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

  10. 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

  11. 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

  12. 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

  13. 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

  14. Adding a Menu Command • The Rename command added to the File menu Grokking the Paradigm

  15. Adding a Menu Command • Enabled when one or more items are selected Grokking the Paradigm

  16. 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

  17. Moving a Menu Command • The Rename command in its new position Grokking the Paradigm

  18. 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

  19. Removing a Menu Command • The Cancel Checkout command removed Grokking the Paradigm

  20. 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

  21. Clarifications/comments?Please send them to:dawson_dennis@emc.comWDK Questions? Please visit:http://developer.emc.com/developer/

More Related