<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@routingData"/>
        </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="hostRoutingConfigAdd" 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@routingData">
                  <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="okRoutingAdd" />
                          </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@routingData">
             <case name="okNode">
              <stackLayout>
               <contents>

            <spacer height="10"/>
            <header data:text="HOST_ROUTING_CONFIG_ADD@hostResourceBundle">
              
              <contents>
                
              <tableLayout width="100%">
                 <contents>
                  <rowLayout>
                   <contents>
                    
                    <cellFormat>
                     <contents>
                      <rowLayout hAlign="left">
                       <contents>
                          <styledText data:text="HOST_ROUTING_CONFIG_ADD_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="okRoutingAdd" />
                       </contents>                       
                      </rowLayout>
                     </contents>
                    </cellFormat>                    
                    
                   </contents>
                  </rowLayout>    
                  
                </contents>
               </tableLayout>
                
               
               <spacer height="20"/>
                            <tableLayout cellSpacing="3">
                             <contents>

                         <rowLayout>
                               <contents>
                                      <spacer width="8"/>
                                  <cellFormat hAlign="left">
                                    <contents>                                     
                                     <styledText data:text="HOST_ROUTING_OPTION@hostResourceBundle" styleClass="OraPromptText"/>                                                             
                                    </contents>
                                  </cellFormat>
                                      <cellFormat hAlign="left">
                                        <contents> 
                                        <spacer width="10"/>
                                         <radioButton name="routingOption"
                                              value="gateway"
                                              styleClass="OraFieldText" 
                                              data:selected="selectedGateway@routingData"
                                              data:text="HOST_GATEWAY@hostResourceBundle"
                                              data:shortDesc="HOST_GATEWAY@hostResourceBundle"
                                              onClick="submitForm('hostRoutingConfigAdd', true, {event:'refToRoutOpt'})"/>
                                              <spacer width="8"/>
                                       </contents>
                                      </cellFormat> 

                                      <cellFormat hAlign="left">
                                        <contents>                                  
                                         
                                         <radioButton name="routingOption"
                                              value="device"
                                              styleClass="OraFieldText"
                                              data:selected="selectedDevice@routingData"
                                              data:text="HOST_DEVICE@hostResourceBundle"
                                              data:shortDesc="HOST_DEVICE@hostResourceBundle"
                                              onClick="submitForm('hostRoutingConfigAdd', true, {event:'refToRoutOpt'})"/>  
                                       </contents>
                                      </cellFormat>             
                                
                                 </contents>
                               </rowLayout>      
                               
                            </contents>
                            </tableLayout>
                            <tableLayout cellSpacing="8">
                             <contents>                               
                               
                             <switcher childName="gateway" data:childName="selectedOption@routingData">
                             <case name="gateway">
                                  <rowLayout>
                                   <contents> 
                                   <spacer width="20"/>

                                     <cellFormat hAlign="right">
                                      <contents>
                                        <spacer height="8"/>
                                        <messageTextInput name="gatewayInput"
                                         columns="30" 
                                         maximumLength="64"
                                         required="uiOnly"
                                         data:prompt="HOST_GATEWAY@hostResourceBundle"
                                         styleClass="OraFieldText"           
                                         shortDesc="Gateway"/>
                                        </contents>
                                       </cellFormat>
                                     </contents>
                                     </rowLayout>
                              </case>
                              </switcher>

                                      
                                      <switcher childName="gateway" data:childName="selectedOption@routingData">
                                      <case name="device">
                                      <rowLayout>
                                      <contents>
                                      <spacer width="40" height="3"/>
                                          <cellFormat hAlign="left">
                                            <contents>
                                            
                                            
                                             <styledText data:text="HOST_DEVICE@hostResourceBundle" styleClass="OraPromptText"/>
                                             
                                            </contents>
                                          </cellFormat>

                                          <cellFormat hAlign="left">
                                          <contents>
                                          
                                          <spacer width="10"/>
                                            <choice name="cardsID" id="cardsID"                                               
                                                    marlin:selectedIndex="1" required="yes">
                                              <contents marlin:childData="DeviceID@routingData">
                                                <option marlin:text="option" marlin:selected="selected"
                                                       data:value="Device" />
                                              </contents>
                                            </choice> 
                                           </contents>
                                           </cellFormat>
                                           </contents>
                                           </rowLayout>
                                          
                                         </case>
                                         </switcher> 
                            </contents>
                            </tableLayout>
                            <tableLayout cellSpacing="8">
                            <contents>
                               
                              <rowLayout>
                               <contents>
                                  <spacer width="8"/>
                                  <cellFormat hAlign="right">
                                    <contents>
                                    <spacer height="8"/>
                                    <messageTextInput name="netmaskInput"
                                     columns="30" 
                                     maximumLength="64"
                                     data:prompt="NETMASK@hostResourceBundle"
                                     styleClass="OraFieldText"           
                                     shortDesc="Netmask"/>                
                                   </contents>
                                  </cellFormat>                               
                                 </contents>
                               </rowLayout>    
                               
                              <rowLayout>
                               <contents>
                                  <spacer width="8"/>
                                  <cellFormat hAlign="right">
                                    <contents>
                                    <spacer height="18"/>
                                    <messageTextInput name="destinationInput"
                                     columns="30" 
                                     maximumLength="64"                         
                                     required="uiOnly"
                                     data:prompt="DESTINATION@hostResourceBundle"
                                     styleClass="OraFieldText"           
                                     shortDesc="Destination"/>   
                                     <spacer height="8"/>   
                                   </contents>
                                  </cellFormat>
                                  
                                  
                                 </contents>
                               </rowLayout>                                   
                               
                              </contents>
                             </tableLayout>                               
              
              </contents>
              
              </header>
              </contents>
             </stackLayout>
            </case>
            <case name="errNode">
              <stackLayout>
               <contents> 
             <messageBox data:message="errMsg@routingData"
                         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="routingData">
          <method class="oracle.sysman.eml.host.admin.HostNetworkCardPageHandler" 
             method="getRoutingData"/>
        </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>

      </provider>

    </dataScope>
  </baja:content>

 <handlers>


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

    <event name="okRoutingAdd">
      <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>

  </handlers>

</page>
