<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:oem="http://xmlns.oracle.com/oem/ui/beans"
      xmlns:data="http://bali.us.oracle.com/cabo/marlin">

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

      <contents>
        <html:title>
         <text data:text="title@cardData"/>
        </html:title>

        <html:noScript>"JavaScript is not supported by your browser. Oracle requires JavaScript support in order to completely render this page."</html:noScript>

        <form name="hostNetworkCardConfig" method="POST">            
        <contents>
        <pageLayout xmlns="http://bali.us.oracle.com/cabo/marlin">
          <mediumAdvertisement>
            <include baja:node="../../../oemBanner" />
          </mediumAdvertisement>
          <marlin:globalButtons>
            <include baja:node="../../../globalButtonBar" />
          </marlin: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>
          
              <contentFooter>
                <switcher childName="okNode" data:childName="node@cardData">
                  <case name="okNode">
                    <tableLayout>
                      <contents>
                        <rowLayout>
                          <contents>
                            <spacer width="20"/>
                             <submitButton data:text="CANCEL@commonResourceBundle" 
                               name="event"
                               value="cancel"/>
                            <spacer width="10"/>
                            <submitButton data:text="OK_BUTTON@mntrResourceBundle"
                                          name="event"
                                          value="cardsConfigOk" />
                          </contents>
                        </rowLayout>
                      </contents>
                    </tableLayout>
                  </case>
                  <case name="errNode">
                    <tableLayout>
                      <contents>
                        <rowLayout>
                          <contents>
                            <submitButton data:text="OK_BUTTON@mntrResourceBundle"
                                          name="event"
                                          value="cancel" />
                          </contents>
                        </rowLayout>
                      </contents>
                    </tableLayout>
                  </case>
                </switcher>
              </contentFooter>          
          
          <contents>
            <switcher childName="okNode" data:childName="node@cardData">
             <case name="okNode">
              <stackLayout>
               <contents>
                  <messageBox messageType="info"
                           data:message="inlineConfirm@cardData"
                           rendered="false"
                           data:rendered="showConfirm@cardData" /> 
            <spacer height="10"/>
            <header data:text="HOST_CONFIGURE_NETWORK_CARD@hostResourceBundle">
              
              <contents>
                
              <tableLayout width="100%">
                 <contents>
                  <rowLayout>
                   <contents>
                    
                    <cellFormat>
                     <contents>
                      <rowLayout hAlign="left">
                       <contents>
                          <styledText data:text="HOST_CONFIGURE_NETWORK_CARD_INSTRUCTION@hostResourceBundle" styleClass="OraPromptText"/>
                       </contents>
                      </rowLayout>
                     </contents>
                    </cellFormat> 
                    
                    <cellFormat>
                     <contents>
                      <rowLayout hAlign="right">
                       <contents>
                            <spacer width="20"/>
                             <submitButton data:text="CANCEL@commonResourceBundle" 
                               name="event"
                               value="cancel"/>
                            <spacer width="10"/>
                            <submitButton data:text="OK_BUTTON@mntrResourceBundle"
                                          name="event"
                                          value="cardsConfigOk" />
                       </contents>                       
                      </rowLayout>
                     </contents>
                    </cellFormat>                    
                    
                   </contents>
                  </rowLayout>    
                  
                </contents>
               </tableLayout>
                
               
               <spacer height="20"/>
                            <tableLayout cellSpacing="3">
                             <contents>

                              <rowLayout>
                               <contents>
                                      <spacer width="8"/>
                                  <cellFormat hAlign="right">
                                    <contents>                                     
                                     <styledText data:text="NAME@hostResourceBundle" styleClass="OraPromptText"/>
                                    </contents>
                                  </cellFormat>
                                  <cellFormat hAlign="left">
                                    <contents>
                                     <spacer height="8"/>
                                    <styledText data:text="networkCardName@cardData" styleClass="OraInstructionTextStrong"/>
                                   </contents>                                   
                                  </cellFormat>                                  
                                 </contents>
                               </rowLayout> 
                               
                              <rowLayout>
                               <contents>
                                      <spacer width="8"/>
                                  <cellFormat hAlign="right">
                                    <contents>                                     
                                     <styledText data:text="NETWORK_DEVICE@hostResourceBundle" styleClass="OraPromptText"/>
                                    </contents>
                                  </cellFormat>
                                  <cellFormat hAlign="left">
                                    <contents>
                                     <spacer height="9"/>
                                    <styledText data:text="networkDeviceId@cardData" styleClass="OraInstructionTextStrong"/>
                                   </contents>                                   
                                  </cellFormat>                                  
                                 </contents>                               
                               </rowLayout> 
                               
                                
                              <rowLayout>
                               <contents>
                                      <spacer width="8"/>
                                  <cellFormat hAlign="right">
                                    <contents>                                     
                                     <styledText data:text="ADDRESS_SETUP_METHOD@hostResourceBundle" styleClass="OraPromptText"/>
                                    </contents>
                                  </cellFormat>
                                  <cellFormat hAlign="left">
                                    <contents>
                                     <spacer height="6"/>                                    
                                        <choice name="setupChoice" columns="2" id="setupChoice"
                                                onChange="submitForm('hostNetworkCardConfig', true, {event:'refToOpt'})"
                                                marlin:selectedIndex="setupSelected@cardData">
                                          <contents marlin:childData="setupOption@setupChoices">
                                            <option marlin:text="name" marlin:selected="selected" 
                                                    marlin:value="value"/>
                                          </contents>
                                        </choice>                                    
                                   </contents>                                   
                                  </cellFormat>                                  
                                 </contents>                               
                               </rowLayout> 

                          
                             
                             <switcher childName="static" data:childName="addressSetupMethod@cardData">
                              <case name="static">                                  
                              <rowLayout>
                               <contents>
                                      <spacer width="8"/>
                                  <cellFormat hAlign="right">
                                    <contents>                                 
                                          <styledText data:text="IP_ADDRESS@hostResourceBundle" styleClass="OraPromptText"/>                                       
                                    </contents>
                                  </cellFormat>
                                  <cellFormat hAlign="left">                                   
                                    <contents>
                                    <spacer width="5"/>
                                         <textInput data:text="ipAddress@cardData" maximumLength="64" name="ipAddressInput"/>
                                     <spacer height="8"/>                                    
                                   </contents>                                   
                                  </cellFormat>                                  
                                 </contents>                               
                               </rowLayout>  
                              </case>
                             </switcher>                                       
                               
                             <switcher childName="static" data:childName="addressSetupMethod@cardData">
                              <case name="static"> 
                              
                              <rowLayout>
                               <contents>
                                      <spacer width="8"/>
                                  <cellFormat hAlign="right">
                                    <contents>
                                      <styledText data:text="SUBNET_MASK@hostResourceBundle" styleClass="OraPromptText"/>                                       
                                    </contents>
                                  </cellFormat>
                                  <cellFormat hAlign="left">                                   
                                    <contents>
                                    <spacer width="5"/>
                                    <textInput data:text="subnetMask@cardData" maximumLength="64" name="subnetMaskInput"/>
                                     <spacer height="8"/>                                    
                                   </contents>                                   
                                  </cellFormat>                                  
                                 </contents>                               
                               </rowLayout>      
                               
                              </case>
                             </switcher>                                 

                          
                              <rowLayout>
                               <contents>
                                      <spacer width="8"/>
                                  <cellFormat hAlign="right">
                                    <contents>
                                      <styledText data:text="MAXIMUM_TRANSFER_UNIT@hostResourceBundle" styleClass="OraPromptText"/>                                       
                                    </contents>
                                  </cellFormat>
                                  <cellFormat hAlign="left">                                   
                                    <contents>
                                    <spacer width="5"/>
                                    <textInput data:text="mtu@cardData" maximumLength="64" name="mtuInput"/>
                                     <spacer height="8"/>                                    
                                   </contents>                                   
                                  </cellFormat>                                  
                                 </contents>                               
                               </rowLayout>              

                             <switcher childName="automatic" data:childName="addressSetupMethod@cardData">
                              <case name="automatic"> 
                              
                              <rowLayout>
                               <contents>                               
                                      <spacer width="8"/>
                                  <cellFormat hAlign="right">
                                    <contents>                                      
                                    
                                    </contents>
                                  </cellFormat>
                                  <cellFormat hAlign="left">                                   
                                    <contents>
                                    <spacer width="2"/>
                                    <checkBox name="updateViaDHCPInput" data:checked="updateViaDHCP@cardData" value="true" data:text="UPDATE_NAME_SERVER@hostResourceBundle"/>
                                     <spacer height="8"/>                                    
                                   </contents>                                   
                                  </cellFormat>                                  
                                 </contents>                               
                               </rowLayout>       
                               
                              </case>
                             </switcher>                                  

                             <switcher childName="automatic" data:childName="addressSetupMethod@cardData">
                              <case name="automatic">                              
                              
                              <rowLayout>
                               <contents>                                                                     
                                  <cellFormat hAlign="right">
                                    <contents>                          
                                        <spacer width="8"/>
                                    </contents>
                                  </cellFormat>
                                  <cellFormat hAlign="right">
                                    <contents>                          
                                        <spacer width="8"/>
                                    </contents>
                                  </cellFormat>                                  
                                  <cellFormat hAlign="right">
                                    <contents>                                    
                                    <spacer height="8"/>
                                        <styledText data:text="UPDATE_NAME_SERVER_TIP@hostResourceBundle" styleClass="OraInlineInfoText"/>
                                     <spacer height="8"/>                                    
                                   </contents>                                   
                                  </cellFormat>                                  
                                 </contents>                               
                               </rowLayout>       

                              </case>
                             </switcher>                              

                              </contents>
                             </tableLayout>                               
              
              </contents>
              
              </header>
              </contents>
             </stackLayout>
            </case>
            <case name="errNode">
              <stackLayout>
               <contents> 
             <messageBox data:message="errMsg@hostLookupTableInfo"
                         messageType="error"
                         longDescURL="unimpl"
                         data:text="ERR_OCCUR@mntrResourceBundle">
             </messageBox>

               </contents>
              </stackLayout>
            </case>
           </switcher>

           <spacer height="15"/>

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

      <provider>

        <data name="cardData">
          <method class="oracle.sysman.eml.host.admin.HostNetworkCardPageHandler" 
             method="getCachedRowData"/>
        </data>

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

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

        <data name="hostResourceBundle">
            <bundle class="oracle.sysman.eml.host.HostResourceBundle"/>
        </data>
        
        <data name="setupChoices">
           <inline>
            <setupOption data:name="HOST_STATIC_ADDRESS_SETUP@hostResourceBundle" value="static"/>
            <setupOption data:name="HOST_AUTOMATIC_ADDRESS_SETUP@hostResourceBundle" value="automatic"/>
          </inline>
        </data>            

      </provider>

    </dataScope>
  </baja:content>

 <handlers>

    <event name="cardsConfigOk">
      <method class="oracle.sysman.eml.host.admin.HostNetworkCardPageHandler"
              method="doCommand"/>
    </event>

    <event name="cancel">
      <method class="oracle.sysman.eml.host.admin.HostNetworkCardPageHandler"
              method="doCommand"/>
    </event>

    <event name="refToOpt">
      <method class="oracle.sysman.eml.host.admin.HostNetworkCardPageHandler"
              method="doCommand"/>
    </event>

  </handlers>

</page>
