// ======================================================================
//
// Copyright (c) 2000-2003 General Electric Company. All Rights Reserved.
//
// ======================================================================


// ----------------------------------------------------------------------
// Query Summary listener
//
// Parameters:
//    aTargetPanel: target panel where the request will be executed
// ----------------------------------------------------------------------

function loadLocators()
{
   //
   // Open the Locators page.
   //
   // none
   //
   // Results: none
   //
   var hcfRoot = top;
   // set up panel title
   hcfRoot.header.writePanelTitle(hcfRoot.LOCATORS_TITLE);


   // set up target
   var aMessage = new hcfRoot.Message();
   aMessage._target.frame = hcfRoot.hcf_panel;
   aMessage.registerUrlParam('swldy_write_xsd_namespace', 'false');

   var aRequest = aMessage.registerRequest();
   aRequest.name = 'locator';
   aRequest.format = 'xml';
   aRequest.registerParam('swldy_command','list');

   var aTransform = aMessage.registerTransform();
   aTransform.stylesheet = 'panel_locator_list.xsl';

   hcfRoot.LOCATOR_URN = null;
   hcfRoot.LOCATOR_REFINEMENT = null;
   hcfRoot.LOCATOR_STEP = null;
   hcfRoot.CURRENT_LOCATOR = null;

   hcfRoot.aSubmitHandler.doMessage(aMessage);
}



function updateLocatorQuerySummary(targetPanel) {
   //
   // For some reason, hcfRoot is not set here. Set it to "top".
   //
   var hcfRoot = top;
   var aUrn = hcfRoot.LOCATOR_MAP_URN;
   if (aUrn == null)
   {
      //
      // Do not update, there is nothing to display
      //
      return;
   }

   hcfRoot.header.writePanelTitle(hcfRoot.FEATURES_TITLE);

   var aMessage = new hcfRoot.Message();
   aMessage._target.frame = hcfRoot.hcf_panel;

   var aRequest = aMessage.registerRequest();
   aRequest.name = 'feature_info';
   aRequest.format = 'xml';
   aRequest.registerParam('swldy_write_features','true');
   aRequest.registerParam('swldy_write_dd','true');
   aRequest.registerParam('swldy_write_xsd_namespace','false');
   aRequest.registerParam('swldy_objects',aUrn);
   aRequest.registerParam('swldy_generate_map','false');

   aTransform = aMessage.registerTransform();
   aTransform.stylesheet = 'panel_feature_summary.xsl';

   hcfRoot.aSubmitHandler.doMessage(aMessage);
}


