<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="compTargetAvail" 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 availability 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@defAvailability">
                 <case name="false">
                  <stackLayout>
                   <contents>

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

                    <styledText data:text="DEFINE_AVAIL_PROMPT@resourceBundle"
                          styleClass="OraPromptText"/>

                    <spacer height="5"/>

                    <tableLayout width="100%">
                     <contents>
                      <rowLayout>
                       <contents>
                        <radioButton name="availChoice"
                                     marlin:selected="allTargets@defAvailability"
                                     marlin:text="DEF_AVAIL_ALL_TARGETS_PROMPT@resourceBundle"
                                     value="allTargets"/>
                       </contents>
                      </rowLayout>
                      <rowLayout>
                       <contents>
                        <rowLayout>
                         <contents>
                          <radioButton name="availChoice"
                                       marlin:selected="numTargets@defAvailability"
                                       marlin:text="DEF_AVAIL_NUM_TARGETS_PROMPT@resourceBundle"
                                       value="numTargets"/>
                          <spacer width="10"/>
                          <choice name="numChoice" columns="50">
                           <contents marlin:childData="numList@defAvailability">
                            <option marlin:text="text" marlin:selected="selected"/>
                           </contents>
                          </choice>
                         </contents>
                        </rowLayout>
                       </contents>
                      </rowLayout>
                      <rowLayout>
                       <contents>
                        <inlineMessage marlin:messageType="pctMsgType@defAvailability"
                                       marlin:anchor="pctAnchor@defAvailability"
                                       marlin:message="pctInlineMsg@defAvailability">
                         <contents>
                           <radioButton name="availChoice"
                                       marlin:selected="pctTargets@defAvailability"
                                       marlin:text="DEF_AVAIL_PCT_TARGETS_PROMPT@resourceBundle"
                                       wrappingDisabled="true"
                                       value="pctTargets"/>
                            <spacer width="10"/>
                            <textInput name="pctChoice"
                                       columns="5"
                                       data:text="pctChoice@defAvailability"/>
                         </contents>
                        </inlineMessage>
                       </contents>
                      </rowLayout>
                      <rowLayout>
                       <contents>
                        <inlineMessage marlin:messageType="targetsMsgType@defAvailability"
                                       marlin:anchor="targetsAnchor@defAvailability"
                                       marlin:message="targetsInlineMsg@defAvailability">
                         <contents>
                          <radioButton name="availChoice"
                                       marlin:selected="selTargets@defAvailability"
                                       marlin:text="DEF_AVAIL_SEL_TARGETS_PROMPT@resourceBundle"
                                       value="selTargets"/>
                         </contents>
                        </inlineMessage>
                       </contents>
                      </rowLayout>
                     </contents>
                    </tableLayout>
                    <tableLayout width="100%">
                     <contents>
                      <rowLayout>
                       <contents>
                          <spacer width="10"/>
                          <table name="AvailTargets" 
                                 data:tableData="availTargets@defAvailability"
                                 formSubmitted="true"
                                 data:columnHeaderData="column@columnHeaderData"
                                 data:value="value@defAvailability"
                                 data:minValue="minValue@defAvailability"
                                 data:blockSize="blockSize@defAvailability"
                                 data:maxValue="maxValue@defAvailability"
                                 data:alternateText = "NO_TARGETS_AVAILABLE@resourceBundle">
     
                           <columnHeaderStamp>
                            <data:boundText select="text"/>
                           </columnHeaderStamp>
    
                           <tableSelection>
                            <multipleSelection data:selected="selected"
                                               data:selection="availTargets@defAvailability">
                            </multipleSelection>
                           </tableSelection>
    
     
                           <contents>
                            <styledText name="Target" data:text="targetName"/>
                            <styledText name="Type" data:text="typeName"/>
                           </contents>
    
                          </table>
                      </contents>
                     </rowLayout>
                    </contents>
                   </tableLayout> 
                  </contents>
                 </stackLayout>
                </case>
                <case name="true">
                 <stackLayout>
                  <contents>
                   <messageBox data:message="errMsg@defAvailability"
                               messageType="error"
                               data:text="errHeader@defAvailability"/>
                   <spacer height="10"/>
                   <styledText data:name="CACHE_ERROR_CONTINUE_MSG@resourceBundle" 
                               data:destination="restartDest@defAvailability"/>
                  </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@commonResourceBundle"/>
         <column data:text="TYPE@mntrResourceBundle"/>
        </inline>
       </data>

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

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

