In the following example, the caller page defines the pop-up window using Dojo, and then calls the editElectronic.jsp file to display the pop-up page.

  1. Create a caller page that defines the pop-up window. For example:

    <script type="text/javascript">
      if (!dijit.byId("mycsrEditAddressFloatingPane")) {
        new dojox.Dialog({ id: "mycsrEditAddressFloatingPane",
          cacheContent: "false",
          executeScripts: "true",
          scriptHasHooks: "true",
          duration: 100,
          "class": "atg_commerce_csr_popup"});
      }
    </script>

  2. Define the pop-up window URL with the window parameters. For example:

    <c:url var="editAddressURL" context="/MY-DCS-CSR}"
           value="editElectronic.jsp">
      <c:param name="nickname" value="${addressKey}"/>
      <c:param name="${stateHolder.windowIdParameterName}"
           value="${windowId}"/>
    </c:url>

    Pass in the windowId and any other parameters that are required by the new pop up page.

  3. Define the link that loads the pop-up page. For example:

    <li class="atg_commerce_csr_editAddress">
    <span class="atg_svc_shipAddressControls">
      <a class="atg_tableIcon atg_propertyEdit" style="min-width:100px"
      title="<fmt:message key="common.address.edit.mouseover"/>" href="#"
        onclick="atg.commerce.csr.common.showPopupWithReturn({
          popupPaneId: 'mycsrEditAddressFloatingPane',
          title: '<fmt:message key="common.edit"/>',
          url: '${editAddressURL}',
          onClose: function( args ) {
            if ( args.result == 'ok' ) {
              atgSubmitAction({
                panelStack :[ 'cmcShippingAddressPS','globalPanels'],
                form : document.getElementById('transformForm')
              });
            }
          }});return false;">
        <fmt:message key="common.edit"/>
      </a>
    </span>
    </li>

    The onClose function defines the actions that should occur when the pop-up window is closed. When the pop-up window is closed automatically, the pop-up page passes back the args.result value as ok, refreshing the shipping address panel stack and global panel stacks.

  4. Save the parent page.


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