<ctrl:page xmlns="http://xmlns.oracle.com/uix/ui"
   xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
   xmlns:uix="http://xmlns.oracle.com/uix/ui"
   xmlns:data="http://xmlns.oracle.com/uix/ui"
   xmlns:html="http://www.w3.org/TR/REC-html40">
<ctrl:content>
<form name="form1">
<contents>

  <dataScope>
  <contents>

    <script>
    <contents>
      function mySelect()
      {
        var choice = document.form1.product;
        // pass name and id back to caller
        top.productName = choice.options[choice.selectedIndex].text;
        top.productId = choice.options[choice.selectedIndex].value;
        top.close();
      }
    </contents>
    </script>
    <html:noScript>
   JavaScript is not supported by your browser. Oracle requires JavaScript support to completely render this page.
    </html:noScript>
    <stackLayout>
    <contents>

    <switcher uix:childName="status@searchData" childName="success">
    <case name="failure">
    <rowLayout>
    <contents>
        <messageBox automatic="false"
                    uix:text="errHdr@searchData"
                    uix:message="errMsg@searchData"
                    messageType="error" />
    </contents>
    </rowLayout>
    </case>
    </switcher>

    <rowLayout>
    <contents>
    <html:br></html:br>
    <html:p>
    <html:font face="Arial,Helvetica,Geneva,sans-serif" size="2" color="#000000">
        <rawText uix:text="chooseProduct@searchData"/>
    </html:font>
    </html:p>
    </contents>
    </rowLayout>

    <messageChoice
         name="product"
         uix:prompt="OPT_PRODUCT@ResourceBundle"
         uix:selectedValue="productIdSel@searchData">

    <contents uix:childData="productList@searchData">
            <option name="optProduct" uix:text="productName" uix:value="productValue"/>
    </contents>
    <end>

    <flowLayout>
    <contents>
    <button uix:text="BTN_SELECT@ResourceBundle" onClick="mySelect();" />
    <button uix:text="BTN_CANCEL@ResourceBundle" onClick="top.close();" />

    </contents>
    </flowLayout>
    </end>

 </messageChoice>

 </contents>
 </stackLayout>

 </contents>
 <provider>

    <data name="ResourceBundle">
        <bundle class = "oracle.sysman.eml.ecm.patch.util.PatchResourceBundle"/>
    </data>

    <data name="searchData">
      <method class="oracle.sysman.eml.ecm.patch.PatchSearchData"
       method="loadProducts"/>
    </data>

  </provider>
  </dataScope>

  </contents>
  </form>
  </ctrl:content>
  </ctrl:page>
