<!--
 *
 *      NAME
 *       historyOSPatches.uix
 *
 *      NOTES
 *       Table to view OS Patches History
 *
 *
 *  @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: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.track.HistoryTrackData" 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="loadHistoryHelpTopic"/>
    </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="headerTitle@getPageTitle">

          <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" />

            <form name="historyOSPatches" >
              <contents>
                <formValue name="blockStart" uix:value="blockStart@patchList"/>

                  <stackLayout>
                  <contents>

                  <tableLayout width="100%">
                  <contents>

                    <rowLayout>
                    <contents>

                     <switcher marlin:childName="status@historyData">
                      <case name="failure">
                        <messageBox automatic="false"
                                    uix:message= "ERR_LOADHISTORY@ResourceBundle"
                                    messageType="error" />
                      </case>
                      <case name="success">


                      <table name="historyTable" width="100%"
                            formSubmitted="true"
                            minValue="1"
                            uix:value="value@historyData"
                            uix:maxValue="maxValue@historyData"
                            uix:blockSize="blockSize@historyData"
                            uix:alternateText="PW_ALT_NOHISTORY@ResourceBundle"
                            uix:tableData="tabledata@historyData">
                          <tableFormat tableBanding="rowBanding"/>

                          <columnHeaderData>
                                <col uix:sort="SORT_DELTATIME@historyData" value="LBL_DELTATIME" uix:text="COLHDR_DELTATIME@ResourceBundle"/>
                                <col uix:sort="SORT_OPERATION@historyData" value="LBL_OPERATION" uix:text="COLHDR_OPERATION@ResourceBundle"/>
                                <col uix:sort="SORT_PATCHNAME@historyData" value="LBL_PATCHNAME" uix:text="COLHDR_PATCHNAME@ResourceBundle"/>
                           </columnHeaderData>

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

                        </table>

                      </case>
                     </switcher>

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

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

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

      <provider>
        <data name="ResourceBundle">
           <bundle class = "oracle.sysman.eml.ecm.track.HistoryTrackResourceBundle"/>
        </data>

        <data xmlns="http://bali.us.oracle.com/cabo/marlin" name="historyData">
           <method class="oracle.sysman.eml.ecm.track.HistoryTrackData" method="populateHistoryTable"/>
        </data>
        
        <data name="sortColumnHeader">
            <method class="oracle.sysman.eml.ecm.track.HistoryTrackData"
                 method="getSortColumnHeader"/>
        </data>

        <data name="getPageTitle">
            <method class="oracle.sysman.eml.ecm.track.HistoryTrackData"
            method="getPageTitle"/>
        </data>

     </provider>

    </dataScope>

  </baja:content>


    <handlers>

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

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

    </handlers>


</page>

