<!--
 *
 *      NAME
 *       patchCacheTable.uix
 *
 *      NOTES
 *       Table to manage patch cache entries
 *
 *
 * MODIFIED (MM/DD/YY)  VERSION
 *  srukumar 08/11/07 - 
 *  summukhe 05/14/07 - 
 *  somukher 07/01/05 - Bug - 4442864 
 *  mningomb 11/04/04 - Making patch submitbutton license-aware 
 *  mningomb 09/06/04 - Make Patch Number as the first column 
 *  mningomb 07/13/04 - 10gr2 changes 
 *  kchiasso 10/27/03 - bugfix 3211721 
 *  kchiasso 07/10/03 - bugfix 2966548
 *  kchiasso 11/20/02 - bugfix-2677323
 *  kchiasso 10/16/02 - ui review cleanup
 *  kchiasso 10/09/02 - ecm_patch_oct0902
 *  kchiasso 10/02/02 - ADA compliant
 *  kchiasso 09/26/02 - Post-noExpire
 *  kchiasso 07/10/02 - preserve sort context prev/next
 *  kchiasso 06/17/02 - new sort
 *  kchiasso 05/30/02 - root url
 *  kchiasso 04/23/02 - bugfix 2150967
 *  @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">

    <html:meta content="max-age=0" http-equiv="Cache-Control"/>

    <dataScope>
      <contents>
                <html:title>
                  <data:text>
                    <boundAttribute name="text">
                      <concat>
                        <dataObject select="loginTitle"
                                    source="getLoginTitle"/>
                        <fixed javaType="string">&nbsp;-&nbsp;</fixed>
                        <dataObject select="pageTitle"
                                    source="getPageTitle"/>
                     </concat>
                    </boundAttribute>
                  </data:text>
                </html:title>

     </contents>
      <provider>
        <data name="getPageTitle">
          <method class="oracle.sysman.eml.ecm.patch.PatchAddData" method="getPageTitle"/>
        </data>
        <data name="getLoginTitle">
          <method class="oracle.sysman.eml.ecm.util.EcmSessionUtil" method="getLoginTitle"/>
        </data>
      </provider>
    </dataScope>
  </baja:head>

   <!-- special handler to load help topic -->
   <handlers>
    <event name="null">
      <method class="oracle.sysman.eml.ecm.OnlineHelp"
              method="loadPatchHelpTopic"/>
    </event>
   </handlers>
  

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

        <pageLayout xmlns="http://bali.us.oracle.com/cabo/marlin" 
            uix:title="pageTitle@getHeader">
            
          <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>

          <marlin:location>
            <include baja:node="../../breadCrumbs" />
          </marlin:location>

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

<!-- *************  End Standard Header ************* -->

          <contents>
          <messageBox automatic="true" />

	  <switcher uix:childName="swlibState@swlibUploadState">
		<case name="success">
			<messageBox automatic="false" 
		                    text="Software Library Upload Status"
                                    messageType="information"	
			>
                        <contents>
                         <link destination="/console/provision/components/components" uix:longDesc="swlibInfo@swlibUploadState" text="Software Library"/>
                        </contents>
                        </messageBox>       
	
		</case>
		<case name="fail">
			<messageBox automatic="false"
		                    text="Software Library Upload Status"
                                    uix:message= "swlibInfo@swlibUploadState"
                                    messageType="error"
                        />
		</case>
	  </switcher>

	  <spacer height="5" />

	  <switcher uix:childName="patchCacheState@cacheUploadState" >
		<case name="success">
			<messageBox automatic="false"
				    text="Patch Cache Upload Status"
                                    uix:message= "patchCacheInfo@cacheUploadState"
                                    messageType="information"
                        />
		</case>
		<case name="fail">
			<messageBox automatic="false"
				    text="Patch Cache Upload Status"
                                    uix:message= "patchCacheInfo@cacheUploadState"
                                    messageType="error"
                        />
		</case>
	  </switcher>


            <form name="patchCacheTable" >
              <contents>
	<html:noScript>
	JavaScript is not supported by your browser. Oracle requires JavaScript
	support to completely render this page 
	</html:noScript>
                <formValue name="FromURLHidden" uix:value="calledFrom@getInfo"/>
                <formValue name="redirURL" value="/ecm/patch/patchCacheAdd"/>

                  <stackLayout>
                  <contents>
                    <styledText styleClass="OraInstructionText"
                        uix:text = "PD_HDR_DEPOT@ResourceBundle"/>

                  <tableLayout>
                  <contents>

                    <rowLayout>
                    <contents>
                      <spacer height="5"/>
                    </contents>
                    </rowLayout>

                    <rowLayout hAlign="right" vAlign="bottom">
                    <contents>
                        <button value="NewFile" uix:text="BTN_NEWPATCHFILE@ResourceBundle" uix:destination="contextPath@getPatchContextPath"/>
                    </contents>
                    </rowLayout>

                    <rowLayout>
                    <contents>

                     <switcher marlin:childName="status@patchList">
                      <case name="failure">
                        <messageBox automatic="false"
                                    uix:message= "ERR_LOADPATCHES@ResourceBundle"
                                    messageType="error" />
                      </case>
                      <case name="success">
                      
                      <table name="cacheTable" width="100%"
                            formSubmitted="true"
                            minValue="1"
                            uix:value="value@patchList"
                            uix:maxValue="maxValue@patchList"
                            uix:blockSize="blockSize@patchList"
                            uix:alternateText="PW_ALT_NOPATCH@ResourceBundle"
                            uix:tableData="tabledata@patchList"
                            uix:summary="TBLSUM_CACHETABLE@ResourceBundle"
                            >
                          <tableFormat tableBanding="rowBanding"/>

                         <columnHeaderData>
                                <col id="name"      uix:sort="SORT_patchId@patchList"          value="LBL_patchId"         uix:columnHeaderText="PD_COLHDR_NAME@ResourceBundle"/>
                                <col id="entry"   uix:sort="SORT_patchEntryDate@patchList"   value="LBL_patchEntryDate"  uix:columnHeaderText="PD_COLHDR_ENTRYDATE@ResourceBundle"/>
                                <col id="type"    uix:sort="SORT_patchType@patchList"        value="LBL_patchType"       uix:columnHeaderText="PD_COLHDR_TYPE@ResourceBundle"/>
                                <col id="patchsetrelease" uix:sort="SORT_patchsetRelease@patchList"     value="LBL_patchsetRelease"    uix:columnHeaderText="PW_COLHDR_PATCHSETRELEASE@ResourceBundle"/>
                                <col id="patchapplicableon" uix:sort="SORT_patchApplicableOn@patchList"     value="LBL_patchApplicableOn"    uix:columnHeaderText="PW_COLHDR_PATCHAPPLICABLEON@ResourceBundle"/>
                                <col id="platform" uix:sort="SORT_patchPlatform@patchList"   value="LBL_patchPlatform"   uix:columnHeaderText="PD_COLHDR_PLATFORM@ResourceBundle"/>
                                <col id="ttype"   uix:sort="SORT_patchTargetType@patchList"  value="LBL_patchTargetType" uix:columnHeaderText="PW_COLHDR_TARGETTYPE@ResourceBundle"/>
                                <col id="desc"    uix:sort="SORT_patchDescription@patchList" value="LBL_patchDescription" uix:columnHeaderText="PD_COLHDR_DESC@ResourceBundle"/>
                                <col id="downloaded"  uix:sort="SORT_downloaded@patchList"           value="LBL_patchDownloaded"          uix:columnHeaderText="PDR_DOWNLOADED@ResourceBundle"/>
                                <col id="size"  uix:sort="SORT_size@patchList"           value="LBL_patchSize"          uix:columnHeaderText="PDR_SIZE@ResourceBundle"/>
                                <col id="aruId" />
                          </columnHeaderData>

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

                          <tableSelection>
                          <singleSelection uix:shortDesc="SGLSEL_CACHETABLE@ResourceBundle" uix:selectedIndex = "selected@patchList">
                            <contents>
                              <submitButton name="event" value="viewDetails" uix:text="BTN_VIEWDETAILS@ResourceBundle"/>
                              <spacer width="3"/>
                              <submitButton name="event" value="viewARUReadme" uix:text="BTN_VIEWREADME@ResourceBundle" />
                              <spacer width="3"/>
                              <submitButton name="event" value="deletePatch" uix:text="BTN_REMOVE@ResourceBundle"/>
                            </contents>
                          </singleSelection>
                          </tableSelection>
                          <contents>
                           <link       headers="name"         name="patchName"  uix:text="LBL_patchId" uix:destination="viewPatchAttr"/>
                           <styledText headers="entry"        uix:text="LBL_patchEntryDate"/>
                           <styledText headers="type"         uix:text="LBL_patchType"/>
                           <styledText headers="patchsetrelease"      uix:text="LBL_patchsetRelease"/>
                           <styledText headers="patchapplicableon"      uix:text="LBL_patchApplicableOn"/>
                           <styledText headers="platform"     uix:text="LBL_patchPlatform"/>
                           <styledText headers="ttype"        uix:text="LBL_patchTargetType"/>
                           <styledText headers="desc"         uix:text="LBL_patchDescription"/>
                           <styledText headers="downloaded"   uix:text="LBL_patchDownloaded"/>
                           <styledText headers="size"         uix:text="LBL_patchSize"/>
                           <styledText headers="aruId"        rendered="false"  uix:text="LBL_patchARUID"/>
                         </contents>

                        </table>

                      </case>
                     </switcher>

                    </contents>
                    </rowLayout>
                   </contents>
                   </tableLayout>
  
                  </contents>
                </stackLayout>

            </contents>
            </form>
            <spacer height="20"/>

          </contents>
        </pageLayout>
      </contents>

      <provider>
            <data name="userInfo">
              <method class="oracle.sysman.emSDK.sec.auth.EMBaseLoginAdapterImpl"
                      method="getUserInfo"/>
            </data>
        <data name="ResourceBundle">
           <bundle class = "oracle.sysman.eml.ecm.patch.util.PatchResourceBundle"/>
        </data>

        <data name="getHeader">
          <method class="oracle.sysman.eml.ecm.patch.PatchAddData" method="getPageTitle"/>
        </data>

        <data xmlns="http://bali.us.oracle.com/cabo/marlin" name="patchList">
           <method class="oracle.sysman.eml.ecm.patch.PatchCacheData" method="populateCacheTable"/>
        </data>

       <data name="getPatchContextPath">
          <method class="oracle.sysman.eml.ecm.ContextPathData" method="getPatchCacheContextPath"/>
        </data>

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

	<data name="swlibUploadState">
		<method class="oracle.sysman.eml.ecm.patch.PatchAddHandler" method="getSwlibStatus"/>
        </data>

	<data name="cacheUploadState">
		<method class="oracle.sysman.eml.ecm.patch.PatchAddHandler" method="getPatchCacheStatus" />
	</data>
	

     </provider>

    </dataScope>

  </baja:content>


    <handlers>

      <event>
	<method class="oracle.sysman.eml.ecm.patch.PatchAddHandler"
	  method="submitJob"/>
      </event>

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

      <event name="deletePatch">
        <method class="oracle.sysman.eml.ecm.patch.PatchCacheHandler"
          method="deletePatchConfirm"/>
      </event>

     <event name="viewARUReadme">
       <method class="oracle.sysman.eml.ecm.patch.ReadmeServlet"
        method="calldoPost"/>
     </event>

     <event name="viewDetails">
       <method class="oracle.sysman.eml.ecm.patch.PatchCacheHandler"
        method="viewDetails"/>
     </event>

      <!-- This handles the next/prev buttons in the admin table -->
      <event name="goto">
        <method class="oracle.sysman.eml.ecm.patch.PatchCacheHandler"
          method ="tableGoto"/>
      </event>

 
    </handlers>


</page>
