230 likes | 388 Views
Grokking the Paradigm Quickie Configurations. Dennis Dawson Principal Technical Writer EMC/Documentum. Here’s what I’m gonna talk about: Webtop Configuration Adding an Action Link Removing an Action Link. Fifteen Minutes’ Worth of Stuff. Which Files Should I Fiddle Around With?.
E N D
Grokking the ParadigmQuickie Configurations Dennis Dawson Principal Technical Writer EMC/Documentum
Here’s what I’m gonna talk about: Webtop Configuration Adding an Action Link Removing an Action Link Fifteen Minutes’ Worth of Stuff Grokking the Paradigm
Which Files Should I Fiddle Around With? • All of the files you need to fiddle with are in the <application root>/webtop directory • Copy files to /webtop/custom to modify them • Do not modify any of the files in place – only modify copies you have created in your custom directory Grokking the Paradigm
Webtop/WDK Layers “Ogres are like onions – they have layers.” - Shrek wdk – app.xml Grokking the Paradigm
Webtop/WDK Layers “Ogres are like onions – they have layers.” - Shrek webcomponent – app.xml wdk – app.xml wdk – app.xml Grokking the Paradigm
Webtop/WDK Layers “Ogres are like onions – they have layers.” - Shrek webtop – app.xml webcomponent – app.xml wdk – app.xml wdk – app.xml Grokking the Paradigm
Webtop/WDK Layers “You know what else everybody likes? Parfaits.” - Donkey custom – app.xml webtop – app.xml webcomponent – app.xml wdk – app.xml Grokking the Paradigm
Tweaking WebtopSelecting a document • Clicking a checkbox to select one document in a list sets off an interesting chain of events in and of itself. • Consider if you had to code by hand not only the decision tree to determine which commands should be available but also the ones that should be disabled Grokking the Paradigm
The Magic Behind the Scenes • When the multiselect object is rendered, the table multiselectActionIdTbl stores Boolean values used to manage which dynamic commands are available checkout checkin cancelco . . . Doc1.htm Doc2.htm Doc3.htm Doc4.xml Doc5.htm Doc6.htm . . . 0 0 1 1 1 1 1 1 0 0 0 0 1 1 0 0 0 0 Grokking the Paradigm
Simple Configurations Have High Value • The most elaborate, complex behavior is pretty much handled for you • As a result, the only thing you really need to do is reference a control and action on the JSP, and leave the “work” to the server at runtime Grokking the Paradigm
Adding an Action LinkCopying toolbar.jsp • In unstripped.jar, locate toolbar.jsp and copy it to the /custom/toolbar directory Grokking the Paradigm
Adding an Action LinkCopying toolbar_component.xml • Locate the /webtop/config/toolbar_component.xml configuration file and copy it to the custom/config directory Grokking the Paradigm
Adding an Action LinkConfiguration • Reconfigure the toolbar component to look for our custom page ... <pages> <start>/custom/toolbar/toolbar.jsp</start> </pages> ... Grokking the Paradigm
Adding an Action LinkModifying toolbar.jsp • Note the script calls at the top of toolbar.jsp. • These provide access to the utility scripts that support common form behaviors and dynamic actions <dmf:webform/> <script language="JavaScript1.2" src='<%=Form.makeUrl(request, "/wdk/include/dynamicAction.js")%>' /> Grokking the Paradigm
Adding an Action Linkfor the Rename command • To add the Rename command to the toolbar, I can add another cell to the HTML table and insert this minimal code: <td nowrap> <dmfx:actionlink action="rename" dynamic="multiselect" label="Rename" /> </td> Grokking the Paradigm
Adding an Action Linkfor the Rename command • Here’s the Rename action link we just added: Grokking the Paradigm
Adding an Action Linkfor the Rename command We can add more attributes to improve the look and feel <td nowrap> <dmfx:actionlink action="rename" dynamic="multiselect" label="Rename" cssclass="toolbaractions" src="icons/toolbar/icon_checkout_16.gif" srcdisabled= "icons/toolbar/icon_checkout_disabled_16.gif" linkspacer="10" /> </td> Grokking the Paradigm
Adding an Action Linkfor the Rename command • Here’s the Rename action link with formatting: Grokking the Paradigm
Adding an Action Linkfor the History command <td nowrap> <dmfx:actionlink dynamic="singleselect" label="History" action="history" cssclass="toolbaractions" src="icons/toolbar/icon_checkout_16.gif" srcdisabled= "icons/toolbar/icon_checkout_disabled_16.gif" /> </td> Grokking the Paradigm
Adding an Action Linkfor the History command • Here is the new History action link. Note that when multiple objects are selected, Rename is active, but History is not Grokking the Paradigm
Removing an Action Link • You can remove an action link from the interface by commenting out its code <!-- DD 11/16/06 td nowrap> <dmfx:actionlink cssclass="toolbaractions" dynamic="multiselect" name="add" action="addtoclipboard" nlsid="MSG_ADD_TO_CLIPBOARD" src="icons/toolbar/icon_copy_16.gif" srcdisabled="icons/toolbar/icon_copy_disabled_16.gif" linkspacer="10" showifdisabled="true" showifinvalid="true"/> </td --> Grokking the Paradigm
Removing an Action Link • Here is the toolbar with the Add to Clipboard command removed: Grokking the Paradigm
Clarifications/comments?Please send them to:dawson_dennis@emc.comWDK Questions? Please visit:http://developer.emc.com/developer/