<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="compTargetsList" method="post" >
      <contents>
       <!--
         set the default event so that
         hitting enter in the message input doesn't
         send a event with no name
       -->
       <formValue baja:event="goto"/>

       <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">
         <boundAttribute name="rendered">
          <if>
           <not>
            <dataObject select="error" source="compTargetData"/>
           </not>
           <dataObject select="RenderedIsTrue" source="renderInfo"/>
           <dataObject select="RenderedIsFalse" source="renderInfo"/>
          </if>
         </boundAttribute>
         </include>
        </location> 

        <contentFooter>
         <include baja:node="compTargetsNavBar">
         <boundAttribute name="rendered">
          <if>
           <not>
            <dataObject select="error" source="compTargetData"/>
           </not>
           <dataObject select="RenderedIsTrue" source="renderInfo"/>
           <dataObject select="RenderedIsFalse" source="renderInfo"/>
          </if>
         </boundAttribute>
         </include>
        </contentFooter>
   
        <copyright>
         <include baja:node="../../copyright" />
        </copyright>

        <contents>
            
         <!--  2nd page - composite target's targets information -->
         <spacer height="10"/>
         <header marlin:text="header@headerInfo" >
          <contents>

           <switcher childName="false" data:childName="error@compTargetData">
            <case name="false">
             <stackLayout>
              <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>
 
                <tableLayout rendered="false"
                             marlin:rendered="errorOccurred@compTargetData"
                             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@compTargetData">
                                <link data:text="label" data:longDesc="message" 
                                      data:destination="destination"/>
                              </contents>
                            </messageBox>
                          </contents>
                        </cellFormat>
                      </contents>
                    </rowLayout>
                  </contents>
                </tableLayout>
 
                <labeledFieldLayout fieldWidth="100%" labelWidth="0%">
                 <contents>
                  <messageStyledText styleClass="OraDataText"
                                     data:prompt="NAME@commonResourceBundle"
                                     data:rendered="edit@compTargetData"
                                     labeledNodeId="compTargetName"
                                     data:text="compTargetDisplayName@compTargetData"/>

                   <messageTextInput columns="64"
                                     data:prompt="NAME@commonResourceBundle"
                                     name="compTargetName"
                                     id="compTargetName"
                                     required = "uiOnly"
                                     data:messageType="compTargetNameMsgType@compTargetData"
                                     data:message="compTargetNameInlineMsg@compTargetData"
                                     data:anchor="compTargetNameAnchor@compTargetData"
                                     data:text="compTargetName@compTargetData">
                    <boundAttribute name="rendered">
                     <not>
                       <dataObject select="edit" source="compTargetData"/>
                     </not>
                    </boundAttribute>
                   </messageTextInput>

                 </contents>
                </labeledFieldLayout>
                <spacer  height="10"/>
  
              <inlineMessage marlin:messageType="targetsMsgType@compTargetData"
                             marlin:anchor="targetsAnchor@compTargetData"
                             marlin:message="targetsInlineMsg@compTargetData">
               <contents>
                <shuttle name="selTarget" 
                         data:leadingHeader="AVAILABLE_TARGETS@mntrResourceBundle" 
                         data:trailingHeader="SELECTED_TARGETS@mntrResourceBundle" 
                         reorderable="false"
                         size="10">
                 <leading>
                  <list multiple="true" data:shortDesc="AVAILABLE_TARGETS@mntrResourceBundle" >
                   <contents marlin:childData="row@compTargetData">
                    <option marlin:text="available" marlin:value="availID"/>
                   </contents>
                  </list>
                 </leading>
                 <trailing>
                  <list multiple="true" data:shortDesc="SELECTED_TARGETS@mntrResourceBundle" >
                   <contents marlin:childData="selectedType@compTargetData">
                    <option marlin:text="selected" marlin:value="selID"/>
                   </contents>
                  </list>
                 </trailing>
                 <filter>
                  <rowLayout>
                   <contents>
                    <styledText data:text="TYPE@mntrResourceBundle"
                                labeledNodeId="itemTypeChoice"
                                styleClass="OraPromptText"/>
                    <spacer width="10"/>
                    <choice name="itemTypeChoice" columns="50" id="itemTypeChoice"
                            onChange="submitForm('compTargetsList', true, {event:'Go'})">
                     <contents marlin:childData="typeName@compTargetData">
                      <option marlin:text="available" marlin:value="availID" marlin:selected="selected" />  
                     </contents>
                    </choice>
                    <spacer width="10"/>
                   </contents>
                  </rowLayout>
                 </filter>
                </shuttle>
               </contents>
              </inlineMessage>

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

              <spacer  height="10"/>

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

   <provider>
    <data name="compTargetData">
     <method class="oracle.sysman.eml.admin.rep.CompTargetManager"
             method="getTargetsListData" />
    </data>         

    <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="headerInfo">
     <method class="oracle.sysman.eml.admin.rep.CompTargetManager"
             method="getHeader" />
    </data>

    <data name="renderInfo">
     <inline RenderedIsTrue="true" RenderedIsFalse="false"/>
    </data>

   </provider>
  </dataScope>

 </baja:content>
 <handlers> 
  <event name="*">
   <method class="oracle.sysman.eml.admin.rep.CompTargetManager"
            method="handleDefaultEvent"/>
  </event>
  <event name="Go">
   <method class="oracle.sysman.eml.admin.rep.CompTargetManager"
              method="handleTargetEvents"/>
  </event>
  <event name="goto">
   <method class="oracle.sysman.eml.admin.rep.CompTargetManager"
              method="doGoto"/>
  </event>
  <event name="Cancel">
   <method class="oracle.sysman.eml.admin.rep.CompTargetManager"
              method="handleCancel"/>
  </event>
 </handlers>
    
</page>

