<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="compTargetPerfTarget" 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@defPerfTargets">
           <case name="false">
            <stackLayout>
             <contents>

              <tableLayout rendered="false"
                           marlin:rendered="errorOccurred@defPerfTargets"
                           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@defPerfTargets">
                              <link data:text="label" data:longDesc="message"
                                    data:destination="destination"/>
                            </contents>
                          </messageBox>
                        </contents>
                      </cellFormat>
                    </contents>
                  </rowLayout>
                </contents>
              </tableLayout>

              <styledText marlin:text="DEFINE_PERF_PROMPT@resourceBundle"
                          styleClass="OraPromptText" />
              <spacer height="5"/>

              <tableLayout width="100%">
               <contents>
                <rowLayout >
                 <contents>
                  <radioButton name="perfChoice"
                               marlin:selected="allTargets@defPerfTargets"
                               marlin:text="DEF_PERF_ALL_TARGETS_PROMPT@resourceBundle"
                               value="allTargets"/>
                 </contents>
                </rowLayout>
                <rowLayout >
                 <contents>
                  <rowLayout >
                   <contents>
                    <radioButton name="perfChoice"
                                 marlin:selected="numTargets@defPerfTargets"
                                 marlin:text="DEF_PERF_NUM_TARGETS_PROMPT@resourceBundle"
                                 wrappingDisabled="true"
                                 value="numTargets"/>
                    <spacer width="10"/>
                    <choice name="numChoice">
                     <contents marlin:childData="numList@defPerfTargets">
                      <option marlin:text="text" marlin:selected="selected"/>
                     </contents>
                    </choice>
                   </contents>
                  </rowLayout>
                 </contents>
                </rowLayout>
                <rowLayout> 
                 <contents>
                  <inlineMessage marlin:messageType="pctMsgType@defPerfTargets"
                               marlin:message="pctInlineMsg@defPerfTargets"
                               marlin:anchor="pctAnchor@defPerfTargets">
                   <contents>
                    <radioButton name="perfChoice"
                                 marlin:selected="pctTargets@defPerfTargets"
                                 marlin:text="DEF_PERF_PCT_TARGETS_PROMPT@resourceBundle"
                                 wrappingDisabled="true"
                                 value="pctTargets"/>
                    <spacer width="10"/>
                    <textInput columns="5"
                               name="pctChoice"
                               required="no"
                               data:text="pctChoice@defPerfTargets"/>
                   </contents>
                  </inlineMessage>
                 </contents>
                </rowLayout>
                <rowLayout>
                 <contents>
                  <inlineMessage marlin:messageType="targetsMsgType@defPerfTargets"
                             marlin:anchor="targetsAnchor@defPerfTargets"
                             marlin:message="targetsInlineMsg@defPerfTargets">
                   <contents>
                  <radioButton name="perfChoice"
                               marlin:selected="selTargets@defPerfTargets"
                               marlin:text="DEF_PERF_SEL_TARGETS_PROMPT@resourceBundle"
                               value="selTargets"/>
                   </contents>
                  </inlineMessage>
                 </contents>
                </rowLayout>
               </contents>
              </tableLayout>
              <tableLayout width="100%">
               <contents>
                <rowLayout>
                 <contents>
                  <spacer width="15" height="10"/>
                    <table name="PerfTargets" 
                           data:tableData="perfTargets@defPerfTargets"
                           formSubmitted="true"
                           data:columnHeaderData="column@columnHeaderData"
                           data:value="value@defPerfTargets"
                           data:minValue="minValue@defPerfTargets"
                           data:blockSize="blockSize@defPerfTargets"
                           data:maxValue="maxValue@defPerfTargets"
                           data:alternateText = "NO_TARGETS_AVAILABLE@mntrResourceBundle">

                     <columnHeaderStamp>
                      <data:boundText select="text"/>
                     </columnHeaderStamp>
    
                     <tableSelection>
                      <multipleSelection data:selected="selected"
                                         data:selection="perfTargets@defPerfTargets">
                      </multipleSelection>
                     </tableSelection>
    
                     <contents>
                      <styledText name="Target" data:text="targetName"/>
                      <styledText name="Type" data:text="typeName"/>
                      <styledText name="Metric" data:text="metricName"/>
                     </contents>

                    </table>
                 </contents>
                </rowLayout>
               </contents>
              </tableLayout>
             </contents>
            </stackLayout>
           </case>
           <case name="true">
            <stackLayout>
             <contents>
              <messageBox data:message="errMsg@defPerfTargets"
                          messageType="error"
                          data:text="errHeader@defPerfTargets"/>
              <spacer height="10"/>
              <styledText data:text="CACHE_ERROR_CONTINUE_MSG@resourceBundle"
                          data:destination="restartDest@defPerfTargets"/>
             </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="NAME@resourceBundle"/>
      <column data:text="TYPE@resourceBundle"/>
      <column data:text="METRIC@resourceBundle"/>
     </inline>
    </data>

    <data name="defPerfTargets">
     <method class="oracle.sysman.eml.admin.rep.CompTargetManager"
                  method="getPerfTargetsData" />
    </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="handlePerfTargetEvents"/>
  </event>
 </handlers>
    
</page>

