<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="form2" >
<contents>

  <dataScope>
  <contents>

    <script>
    <contents>
      function mySelect()
      {
        var choice = document.form2.release;
        // pass name and id back to caller
        top.releaseName = choice.options[choice.selectedIndex].text;
        top.releaseId = choice.options[choice.selectedIndex].value;

//        alert ( 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="chooseRelease@searchData"/>
    </html:font>
    </html:p>
    </contents>
    </rowLayout>

    <messageChoice
         name="release"
         uix:prompt="OPT_RELEASE@ResourceBundle"
         uix:selectedValue="releaseIdSel@searchData">

    <contents uix:childData="releaseList@searchData">
            <option name="optRelease" uix:text="releaseName" uix:value="releaseValue"/>
    </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="loadReleases"/>
    </data>

  </provider>
  </dataScope>

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