<!--
 * Copyright (c) 2001, 2006, Oracle. All rights reserved.  
 *
 *      NAME
 *       cloneWiz_SourceHome.uix
 *
 *      NOTES
 *       Select from Table Home to Clone.
 *

 * MODIFIED   (MM/DD/YY)  VERSION
 *   amani     11/08/06 - Backport amani_bug-5623085 from main
 *   amani     08/01/06 - Backport amani_bug-5075347 from main
 *   audupi    12/11/05 - Backport audupi_bug-4397373 from main 
 *   amani     10/27/06 - For bug fix 5623085,adding new form value
 *                        EXACT_SEARCH
 *   amani     05/30/06 - For bug fix 5235913. Added hidden attribute(sw_init) n formsubmit for swlib
 *   audupi    11/16/05 - 4253077 - UI changes 
 *   audupi    09/15/05 - Licensing changes 
 *   audupi    07/14/05 - 4428908 - fix for javascript:onChange
 *   audupi    07/12/05 - 4463483 - Including summary for tables 
 *   anusharm  06/28/05 - cp image
 *   audupi    07/01/05 - 4463393 - Associating a label for form input fields
 *                        4428908 - Using PPR instead of javascript:onChange event
 *   spahuja   05/06/05 - Making selectSrcLibTable sortable
 *   anusharm  03/24/05 - ui review comments(4253072)
 *   mnosseir  03/03/05 - more columns in sw library table 
 *   anusharm  11/02/04 - changing instruction and lable layout
 *   kchiasso  11/12/03 - help context 
 *   kchiasso  10/30/03 - bugfix 3225315
 *   kchiasso  10/27/03 - bugfix 3214245 rmv tip
 *   kchiasso  10/13/03 - fix label
 *   kchiasso  10/01/03 - bugfix 3158851
 *   kchiasso  09/12/03 - 
 *   kchiasso  09/12/03 - search on Enter
 *   mgoodric  08/25/03 - handle ?event=createNew 
 *   kchiasso  08/21/03 - kchiasso_clonefromfile 
 *  @author  kChiasson
 *
-->

<page xmlns="http://bali.us.oracle.com/cabo/baja"
      xmlns:baja="http://bali.us.oracle.com/cabo/baja"
      xmlns:uix="http://bali.us.oracle.com/cabo/marlin"
      xmlns:marlin="http://bali.us.oracle.com/cabo/marlin"
      xmlns:html="http://www.w3.org/TR/REC-html40"
      xmlns:oem="http://xmlns.oracle.com/oem/ui/beans"
      xmlns:data="http://bali.us.oracle.com/cabo/marlin">

 <baja:head  xmlns="http://bali.us.oracle.com/cabo/marlin"
              xmlns:uix="http://bali.us.oracle.com/cabo/marlin"
              xmlns:html="http://www.w3.org/TR/REC-html40">

   <dataScope>
      <contents>

      <head xmlns="http://xmlns.oracle.com/uix/ui"
         uix:title="pageTitle@getPageTitle"/>
      </contents>
      <provider>
        <data name="getPageTitle">
          <method class="oracle.sysman.eml.ecm.cloneHome.CloneHomeData" method="getPageTitle"/>
        </data>
      </provider>
    </dataScope>
 </baja:head>

    <!-- special handler to load help topic -->

   <handlers>
    <event name="null">
      <method class="oracle.sysman.eml.ecm.OnlineHelp"
              method="loadCloneHomeHelpTopic"/>
    </event>
   </handlers>


  <baja:content xmlns="http://bali.us.oracle.com/cabo/marlin">

   <body onLoad = "document.forms[0].sourceType.focus()">
   <contents>

   <dataScope>
      <contents>

<script>
<contents>

// do search if user clicks enter in search textfield
function doSearch()
{
  if ((window.event.which == 13) || (window.event.keyCode == 13))
  {
    submitForm('cloneWiz_SourceHome',0,{'event':'search'});
  } 

  return true;
}

// select source type
function showSourceType()
{
  submitForm('cloneWiz_SourceHome',0,{'event':'sourceType'});
  return true;
}

</contents>
</script>

        <form name="cloneWiz_SourceHome">
        <contents>
            <formValue name="FromURLHidden" uix:value="calledFrom@getInfo"/>
            <formValue name="INIT" />
	    <formValue name="EXACT_SEARCH" />
	    <!--formValue name="SW_INIT" /-->
            <formValue id="dep1" name="blockStart" uix:value="blockStart@srcList"/>

        <pageLayout xmlns="http://bali.us.oracle.com/cabo/marlin"
            uix:title="pageTitle@getHeaderTitle">

          <mediumAdvertisement>
            <include baja:node="../../oemBanner" />
          </mediumAdvertisement>

          <globalButtons>
            <include baja:node="../../globalButtonBar" />
          </globalButtons>
          <marlin:tabs>
            <include baja:node="../../globalTabs" />
          </marlin:tabs>
          <marlin:pageHeader>
            <include baja:node="../../globalHeader" />
          </marlin:pageHeader>
        
          <pageButtons>
            <include baja:node="cloneWiz_Footer"/>
          </pageButtons>

          <pageStatus>
	   <stackLayout >
             <contents>
	      <stackLayout>
	       <contents>
                 <styledText styleClass="OraInstructionText" uix:text="INSTR_DEPRECATED_INFO@ResourceBundle" />
	         <styledText data:text="INSTR_DP_HOME@ResourceBundle" data:destination="dpHomepage@srcList" />
		</contents>
	       </stackLayout>
	       <stackLayout>
		<contents>
 	         <styledText styleClass="OraInstructionText" uix:text="INSTR_SELECTSOURCE@ResourceBundle" />
		</contents>
	       </stackLayout>
	     </contents>
           </stackLayout>
          </pageStatus>

          <location>
            <include baja:node="cloneWiz_Train"/>
          </location>

          <copyright>
            <include baja:node="../../copyright"/>
          </copyright>

        <contents>

        <messageBox automatic="true" />

        <switcher uix:childName="status@srcList" childName="success">
        <case name="failure">
              <messageBox automatic="false"
                    uix:text="errHdr@srcList"
                    uix:message="errMsg@srcList"
                    messageType="error" />
        </case>
        <case name="success">


        <stackLayout>
        <contents>
	    <html:br/>
	    <labeledFieldLayout width="0" fieldWidth="0" labelWidth="0" columns="0">
	    <contents>
	    <cellFormat hAlign="left">
	    <contents>
	    <styledText labeledNodeId="sourceType" styleClass="OraInstructionText" uix:text="STEP_PAGE_SOURCESELECT@ResourceBundle"/>
	    <choice name="sourceType" id="sourceType" uix:selectedIndex="sourceTypeIndex@srcList" onChange="javascript:showSourceType();">
		  <contents>
		    <option uix:text="CHK_IOH@ResourceBundle"/>
		    <option uix:text="CHK_SWLIB@ResourceBundle"/>
		  </contents>
	    </choice>
	    </contents>
	    </cellFormat>
	    <cellFormat hAlign="right" width="60%">
	    <contents>
	    <include baja:node="searchCloneSource" />
	    </contents>
	    </cellFormat>
            </contents>
	    </labeledFieldLayout>
	    <html:br></html:br>

	    <!--rowLayout>
	    <contents>
            <include baja:node="searchCloneSource" />
	    </contents>
	    </rowLayout-->

	    <table name="selectSrcLibTable"
                   id="selectSrcLibId"
                   partialRenderMode="multiple"
                   partialTargets="dep1"
                   width="100%" minValue="1"
                   formSubmitted="true"
                   uix:columnHeaderData="columnHeaderData@srcList"
                   uix:tableData="tableData@srcList"
                   uix:maxValue="maxValue@srcList"
                   uix:blockSize="blockSize@srcList"
                   uix:alternateText="ALT_NOHOMES@ResourceBundle"
                   unvalidated="true"
                   uix:value="value@srcList"
		   uix:rendered="swlib@srcList"
       uix:summary="SUMMARY_SRCLIBTABLE@ResourceBundle">

             <tableFormat tableBanding="rowBanding"/>
                <columnHeaderStamp>
                  <sortableHeader uix:text="columnHeaderText"
                                  uix:value="value"
                                  uix:sortable="sort">
                        <boundAttribute name="sortable">
                        <defaulting>
                            <dataObject uix:source="(value)@sortColumnHeader"/>
                            <dataObject select="sort"/>
                        </defaulting>
                        </boundAttribute>
                 </sortableHeader>
                </columnHeaderStamp>

            <columnHeaderData>
		<col id="hdrname" uix:sort="SORT_compName@srcList"  value="compName" uix:columnHeaderText="HDR_SWLIB_NAME@ResourceBundle" />
		<col id="hdrdesc" uix:sort="SORT_compDesc@srcList"  value="compDesc" uix:columnHeaderText="HDR_SWLIB_DESC@ResourceBundle" />
		<col id="hdrplatform" uix:sort="SORT_platform@srcList"  value="platform" uix:columnHeaderText="HDR_PLATFORM@ResourceBundle" />
		<col id="hdrproducts" uix:sort="SORT_products@srcList"  value="products" uix:columnHeaderText="HDR_PRODUCTS@ResourceBundle" />
	    </columnHeaderData>

            <tableSelection>
                <singleSelection uix:shortDesc="DESC_SELHOME@ResourceBundle" uix:selectedIndex="selected@srcList">
                </singleSelection>
            </tableSelection>

            <contents>
                <styledText headers="hdrname"     uix:text="compName"/>
		<styledText headers="hdrdesc"     uix:text="compDesc"/>
		<styledText headers="hdrplatform" uix:text="platform"/>
                <styledText headers="hdrproducts" uix:text="products"/>
	    </contents>

            </table>

            <table name="selectSrcTable"
                   id="selectSrcId"
                   partialRenderMode="multiple"
                   partialTargets="dep1"
                   width="100%" minValue="1"
                   formSubmitted="true"
                   uix:columnHeaderData="columnHeaderData@srcList"
                   uix:tableData="tableData@srcList"
                   uix:maxValue="maxValue@srcList"
                   uix:blockSize="blockSize@srcList"
                   uix:alternateText="ALT_NOHOMES@ResourceBundle"
                   unvalidated="true"
                   uix:value="value@srcList"
		   uix:rendered="installedHome@srcList"
       uix:summary="SUMMARY_SRCTABLE@ResourceBundle">

             <tableFormat tableBanding="rowBanding"/>
                <columnHeaderStamp>
                  <sortableHeader uix:text="columnHeaderText"
                                  uix:value="value"
                                  uix:sortable="sort">
                        <boundAttribute name="sortable">
                        <defaulting>
                            <dataObject uix:source="(value)@sortColumnHeader"/>
                            <dataObject select="sort"/>
                        </defaulting>
                        </boundAttribute>
                 </sortableHeader>
                </columnHeaderStamp>

            <columnHeaderData>
                <col id="hdrhost"     uix:sort="SORT_host@srcList"     value="host"     uix:columnHeaderText="HDR_HOST@ResourceBundle" />
                <col id="hdrlochome"  uix:sort="SORT_locHome@srcList"  value="locHome"  uix:columnHeaderText="HDR_LOCHOME@ResourceBundle" /> 
                <col id="hdrplatform" uix:sort="SORT_platform@srcList" value="platform" uix:columnHeaderText="HDR_PLATFORM@ResourceBundle" /> 
		<col id="hdrtargets"  sort="no"                                         uix:columnHeaderText="HDR_TARGETS@ResourceBundle" /> 
                <col id="hdrproducts" uix:sort="SORT_products@srcList" value="products" uix:columnHeaderText="HDR_PRODUCTS@ResourceBundle" /> 
            </columnHeaderData>

 
            <tableSelection>
                <singleSelection uix:shortDesc="DESC_SELHOME@ResourceBundle" uix:selectedIndex="selected@srcList">
                </singleSelection>
            </tableSelection>

            <contents>
                <styledText headers="hdrhost"     uix:text="host"/>
		<dataScope>
		<contents>
                    <oem:license>
                      <contents>
			<link       headers="hdrlochome"  uix:text="locHome" uix:destination="dest"/>
                      </contents>
                    </oem:license>
			<spacer width="4"/>
			<image data:source="patchadvwarning" data:shortDesc="warningdesc"/>
		</contents>
		</dataScope>
                <styledText headers="hdrplatform" uix:text="platform"/>
		<styledText headers="hdrtargets"  uix:text="targets"/>
                <styledText headers="hdrproducts" uix:text="products"/>
            </contents>

            </table>

        </contents>
        </stackLayout>

        </case>
        </switcher>

        </contents>
        </pageLayout>

     </contents>
     </form>

     </contents>

      <provider>

      <data name="ResourceBundle">
       <bundle class = "oracle.sysman.eml.ecm.cloneHome.util.CloneHomeResourceBundle"/>
      </data>

      <data name="navStep">
        <method class="oracle.sysman.eml.ecm.cloneHome.CloneHomeData"
         method="getWizardStep"/>
      </data>

      <data name="getPageTitle">
          <method class="oracle.sysman.eml.ecm.cloneHome.CloneHomeData" 
            method="getPageTitle"/>
      </data>

      <data name="getHeaderTitle">
          <method class="oracle.sysman.eml.ecm.cloneHome.CloneHomeData" 
            method="getHeaderTitle"/>
      </data>

      <data name="srcList">
          <method class="oracle.sysman.eml.ecm.cloneHome.CloneHomeData" 
            method="populateSrcTable"/>
      </data>

      <data name="sortColumnHeader">
          <method class="oracle.sysman.eml.ecm.cloneHome.CloneHomeData"
              method="getSortColumnHeader"/>
      </data>

    <data name="getInfo">
        <method class="oracle.sysman.eml.ecm.cloneHome.CloneHomeData"
        method="returnCaller"/>
    </data>


      </provider>

    </dataScope>

     </contents>
     </body>


  </baja:content>

   <handlers>

      <!-- This handles the next/prev buttons in the results table -->
      <event name="goto" source="selectSrcTable">
        <method class="oracle.sysman.eml.ecm.cloneHome.CloneHomeHandler"
          method ="tableGoto"/>
      </event>

       <event name="goto" source="selectSrcLibTable">
        <method class="oracle.sysman.eml.ecm.cloneHome.CloneHomeHandler"
          method ="tableGoto"/>
      </event>

      <event name="goto" source="homeNav">
        <method class="oracle.sysman.eml.ecm.cloneHome.CloneHomeHandler"
         method="stepNext"/>
      </event>

      <event name="cancel">
       <method class="oracle.sysman.eml.ecm.cloneHome.CloneHomeHandler"
        method="returnToCaller"/>
      </event>

      <event name="sort">
        <method class="oracle.sysman.eml.ecm.cloneHome.CloneHomeHandler"
          method="doSort"/>
      </event>

      <event name="search">
       <method class="oracle.sysman.eml.ecm.cloneHome.CloneHomeHandler"
        method="doSearch"/>
      </event>

      <event name="sourceType">
       <method class="oracle.sysman.eml.ecm.cloneHome.CloneHomeHandler"
        method="showSourceType"/>
      </event>

      <!-- This handles the Go button from the Job page -->
      <event name="createNew">
        <method class="oracle.sysman.eml.ecm.cloneHome.CloneHomeHandler"
                method="createNew"/>
      </event>

  </handlers>

</page>
