<page xmlns="http://bali.us.oracle.com/cabo/baja" 
      xmlns:baja="http://bali.us.oracle.com/cabo/baja"
      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>
        <html:title>
          <text data:text="title@headerInfo"/>
        </html:title>
       </contents>
       <provider>
        <data name="headerInfo">
          <method class="oracle.sysman.eml.admin.rep.CompTargetManager"
                  method="getHeader" />
        </data>
       </provider>
    </dataScope>
  </baja:head>

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

   <dataScope>
    <contents>
     <form name="compTargetPerf" method="post" >
      <contents>

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

        <globalButtons>
         <include baja:node="../../globalButtonBar" />
        </globalButtons>

         <tabs>
           <include baja:node="../../globalTabs" />
         </tabs>

        <pageHeader>
         <include baja:node="header"/>
        </pageHeader>

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

        <contentFooter>
         <include baja:node="compTargetsNavBar"/>
        </contentFooter>

        <copyright>
         <include baja:node="../../copyright" />
        </copyright>
   
        <contents>
            
         <!--  3rd page - composite target's performance definition -->
         <spacer height="10"/>
         <header marlin:text="header@headerInfo" >
          <contents>

           <tableLayout width="98%">
            <contents>
             <rowLayout hAlign="right">
              <contents>
               <cellFormat>
                <contents>
                 <styledText text=""/>
                </contents>
               </cellFormat>
               <cellFormat>
                <contents>
                 <include baja:node="compTargetsNavBar"/>
                </contents>
               </cellFormat>
              </contents>
             </rowLayout>
            </contents>
           </tableLayout>

           <switcher childName="false" data:childName="error@defPerformance">
            <case name="false">
             <stackLayout>
              <contents>
               <tableLayout rendered="false"
                            marlin:rendered="errorOccurred@defPerformance"
                            cellSpacing="5"
                            width="100%">
                 <contents>
                   <rowLayout vAlign="top">
                     <contents>
                       <cellFormat vAlign="top">
                         <contents>
                           <messageBox data:message="GEN_ERROR_HEADER@resourceBundle"
                                       messageType="error">
                             <contents marlin:childData="errorData@defPerformance">
                               <link data:text="label" data:longDesc="message"
                                     data:destination="destination"/>
                             </contents>
                           </messageBox>
                         </contents>
                       </cellFormat>
                     </contents>
                   </rowLayout>
                 </contents>
               </tableLayout>
    
               <styledText data:text="SELECT_PERF_METRICS_PROMPT@resourceBundle"
                           styleClass="OraPromptText"/>
               <spacer height="5"/>

               <inlineMessage marlin:messageType="metricsMsgType@defPerformance"
                              marlin:anchor="metricsAnchor@defPerformance"
                              marlin:message="metricsInlineMsg@defPerformance">
                <contents>
                 <table name="PerfMetrics" width="100%"
                        data:tableData="perfMetrics@defPerformance"
                        data:columnHeaderData="column@columnHeaderData"
                        data:value="value@defPerformance"
                        data:minValue="minValue@defPerformance"
                        data:blockSize="blockSize@defPerformance"
                        data:maxValue="maxValue@defPerformance"
                        formSubmitted="true"
                        data:alternateText = "NO_TARGETS_AVAILABLE@mntrResourceBundle">

                  <columnHeaderStamp>
                   <data:boundText select="text"/>
                  </columnHeaderStamp>
  
                  <contents>
  
                   <styledText data:text="targetName"/>
                   <switcher data:childName="noPerfMetrics">
                    <case name="true">
                     <styledText data:text="NO_PERF_METRICS_FOUND@resourceBundle"/>
                    </case>
                    <case name="false">
                     <choice name="metricChoice" columns="50" 
                             data:selectedValue="selectedItem">
                      <contents marlin:childData="metricList">
                       <option marlin:text="available"/>
                      </contents>
                     </choice>
                    </case>
                   </switcher>
                  </contents>
                 </table>
                </contents>
               </inlineMessage>

               <tip>
                <contents>
                 <styledText data:text="SELECT_PERF_METRICS_HELP@resourceBundle"/>
                </contents>
               </tip>

              </contents>
             </stackLayout>
            </case>
            <case name="true">
             <stackLayout>
              <contents>
               <messageBox data:message="errMsg@defPerformance"
                           messageType="error"
                           data:text="errHeader@defPerformance"/>
               <spacer height="10"/>
               <styledText data:text="CACHE_ERROR_CONTINUE_MSG@resourceBundle"
                           data:destination="restartDest@defPerformance"/>
              </contents>
             </stackLayout>
            </case>
           </switcher>
          </contents>
         </header>
        </contents>         
       </pageLayout>
      </contents>
     </form> 
    </contents>
    <provider>

    <data name="resourceBundle">
     <bundle class="oracle.sysman.eml.admin.rep.AdminResourceBundle"/>
    </data>

    <data name="commonResourceBundle">
     <bundle class="oracle.sysman.resources.CommonResourceBundle"/>
    </data>

    <data name="mntrResourceBundle">
     <bundle class="oracle.sysman.resources.MntrResourceBundle"/>
    </data>

     <data name="columnHeaderData">
      <inline>
       <column data:text="TYPE@resourceBundle"/>
       <column data:text="METRIC@resourceBundle"/>
      </inline>
     </data>

     <data name="defPerformance">
      <method class="oracle.sysman.eml.admin.rep.CompTargetManager"
                  method="getPerfMetricsData" />
     </data>         

    <data name="headerInfo">
     <method class="oracle.sysman.eml.admin.rep.CompTargetManager"
             method="getHeader" />
    </data>

    </provider>
   </dataScope>

  </baja:content>

  <handlers> 
    <event name="Cancel">
      <method class="oracle.sysman.eml.admin.rep.CompTargetManager"
              method="handleCancel"/>
    </event>

    <event name="goto">
      <method class="oracle.sysman.eml.admin.rep.CompTargetManager"
              method="handlePerfEvents"/>
    </event>

    <event name="hide">
      <method class="oracle.sysman.eml.admin.rep.CompTargetManager"
              method="handlePerfEvents"/>
    </event>

    <event name="show">
      <method class="oracle.sysman.eml.admin.rep.CompTargetManager"
              method="handlePerfEvents"/>
    </event>

  </handlers>
    
</page>

