A gadget is an individual piece of functionality encapsulated in a JSP file so it can easily be included in multiple pages or moved to different locations on a page. The use of gadgets makes it possible to build pages from reusable elements. For example, the store.war/navigation/gadgets/clickToCallLink.jsp gadget, which is used on a number of pages, determines if the Oracle Click-to-Call On Demand integration is enabled, and if it is, renders a <div> element to serve as an anchor for placing a Click-to-Call link:

  <dsp:importbean bean="/atg/dynamo/droplet/ComponentExists"/>
    If the Click To Call feature is disabled, this entire div can be safely
    bypassed. We can test if Click To Call is installed by the existence
    of the clicktoconnect Configuration component.
  <dsp:droplet name="ComponentExists" path="/atg/clicktoconnect/Configuration">

    <dsp:oparam name="true">
        In order to display the ClickToCall button we need to add an anchor in the
        place we want the ClickToCall button to be rendered. This anchor is the
        HTML div below. Its id attribute must match the 'Relative to Layer ID'
        property of the WebCare link
      <dsp:getvalueof var="pageName" param="pageName"/>
      <div id="atg_store_c2c_${pageName}">&nbsp;</div>

Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices