 <!--
 *
 *      NAME
 *       patchSearchTable.uix
 *
 *      NOTES
 *       Advanced search for table entries.
 *       The search attributes are added dynamically to include
 *       only items user wants to search on.  All attributes are initially
 *       hidden and enabled accordingly.
 *
 *
 *  @author  kChiasson
 *
-->

<page xmlns="http://bali.us.oracle.com/cabo/baja"
      xmlns:baja="http://bali.us.oracle.com/cabo/baja"
      xmlns:uix="http://bali.us.oracle.com/cabo/marlin"
      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://www.w3.org/TR/REC-html40">
    <title>Oracle Enterprise Manager - Patch Depot </title>
  </baja:head>

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

  <pageLayout xmlns="http://bali.us.oracle.com/cabo/marlin" >
          <mediumAdvertisement>
            <include baja:node="../../oemBanner" />
          </mediumAdvertisement>
          <globalButtons>
            <include baja:node="../../globalButtonBar" />
          </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>Copyright 2001, Oracle Corp.</copyright>


<!-- *************  End Standard Header ************* -->

  <contents>
  <messageBox automatic="true" />
<!--
<script source="/ecm/patch/ecmAdvisoryRule.js"> </script>
-->

<script>
<contents>
function getBrowser()
{
<!--
  alert ("in getBrowser()");
  alert (navigator.appName);
-->
  if (navigator.appName.indexOf("Microsoft") != -1)
  {
    document.forms[0].isIE.value = "true";
  }
  else
  {
    document.forms[0].isIE.value = "false";
  }
}
</contents>
</script>

  <body onLoad="getBrowser();">
  <contents>

  <form name="patchSearchTable" >
  <contents>
  <formValue name="isIE"  />

  <messageBox automatic="true" />

  <spacer height="5"/>
  <header text="Patch Depot">
  <contents>
  <spacer height="1"/>

  <stackLayout>
  <contents>

    <switcher marlin:childName="searchType@getSearchType">
    <case name="simple">

    <stackLayout>
    <contents>

        <header text="Simple Search">
        <contents>

        <tableLayout width="100%">
        <contents>

        <rowLayout>
        <contents>

            <styledText styleClass="OraInstructionText"
                         text="Type in a search string to find a specific patch or result set.
                               Use the pulldown list to narrow your search results."/>


            <cellFormat>
            <contents>

            <rowLayout hAlign="right">
            <contents>
                <spacer width="8"/>
                <button text="Advanced Search"
                        destination="patchSearchTable$searchType=advanced"
                        rendered="true"/>
            </contents>
            </rowLayout>

            </contents>
            </cellFormat>

        </contents>
        </rowLayout>

        <rowLayout>
        <contents>
        <spacer height="10"/>
        </contents>
        </rowLayout>


        </contents>
        </tableLayout>

        <tableLayout width="40%">
        <contents>

        <rowLayout>
        <contents>

            <cellFormat wrappingDisabled="true" hAlign="right">
            <contents>

            <rowLayout>
            <contents>

            <styledText styleClass="OraPromptText" text="Search"/>
            <spacer width="8"/>
            <choice name="searchChoice">
            <contents>
<option value="patchName" uix:text="OPT_PATCHNAME@ResourceBundle"/>
<option value="targetType" uix:text="OPT_TARGETTYPE@ResourceBundle"/>
<option value="productFamily" uix:text="OPT_PRODUCTFAMILY@ResourceBundle"/>
<option value="product" uix:text="OPT_PRODUCT@ResourceBundle"/>
<option value="platform" uix:text="OPT_PLATFORM@ResourceBundle"/>
<option value="language" uix:text="OPT_LANGUAGE@ResourceBundle"/>
<option value="patchType" uix:text="OPT_PATCHTYPE@ResourceBundle"/>
<option value="entryDate" uix:text="OPT_ENTRYDATE@ResourceBundle"/>
<option value="applied" uix:text="OPT_APPLIED@ResourceBundle"/>
<option value="approved" uix:text="OPT_APPROVED@ResourceBundle"/>
<option value="description" uix:text="OPT_DESCRIPTION@ResourceBundle"/>
<option value="readme" uix:text="OPT_READMECONTENTS@ResourceBundle"/>
            </contents>
            </choice>
            <spacer width="8"/>
            <textInput
                name="searchText"
                uix:text="search"
                columns="25"/>
            <spacer width="8"/>

            </contents>
            </rowLayout>

            </contents>
            </cellFormat>

            <cellFormat hAlign="left">
            <contents>
            <button text="Go"
                destination=""
                rendered="true"/>
            </contents>
            </cellFormat>

        </contents>
        </rowLayout>

        </contents>
        </tableLayout>

        </contents>
        </header>

    </contents>
    </stackLayout>

    </case>
    <case name="advanced">

    <stackLayout>
    <contents>

        <header text="Advanced Search">
        <contents>

        <tableLayout width="100%">
        <contents>

        <rowLayout>
        <contents>

            <styledText styleClass="OraInstructionText"
                         text="Specify parameters and values to filter the patches that are displayed in your result set."/>

            <cellFormat>
            <contents>
                <rowLayout hAlign="right">
                <contents>
                    <spacer width="8"/>
                    <button text="Simple Search"
                                        destination="patchSearchTable$searchType=simple"
                                        rendered="true"/>
                </contents>
                </rowLayout>
            </contents>
            </cellFormat>
        </contents>
        </rowLayout>

        <rowLayout>
        <contents>
        <spacer height="10"/>
        </contents>
        </rowLayout>
        </contents>
        </tableLayout>


        <tableLayout borderWidth="0">
        <contents>

        <rowLayout>
        <contents>
            <radioButton name="condition"
                    value="AND"
                    uix:selected="and@getSearchType" />
            <styledText styleClass="OraPromptText" text="Show table results when all conditions are met."/>
        </contents>
        </rowLayout>


        <rowLayout>
        <contents>
            <radioButton name="condition"
                    value="OR"
                    uix:selected="or@getSearchType" />
            <styledText styleClass="OraPromptText" text="Show table results when any conditions are met."/>
        </contents>
        </rowLayout>

        </contents>
        </tableLayout>

        <tableLayout width="50%" >
        <contents>

        <rowLayout>
        <contents>
            <html:br> </html:br>
        </contents>
        </rowLayout>

<!-- include all the enabled search attributes -->
            <include baja:node="searchContent"/>

        <rowLayout>
        <contents>
            <html:br> </html:br>
        </contents>
        </rowLayout>

        <rowLayout>
        <contents>

            <cellFormat wrappingDisabled="true" hAlign="right">
            <contents>
                <styledText styleClass="OraPromptText" uix:text="filler"/>
            </contents>
            </cellFormat>
            <spacer width="10"/>

            <cellFormat wrappingDisabled="true">
            <contents>

                <button text="Search"
                    destination=""
                    rendered="true"/>
                <spacer width="8"/>
                <submitButton text="Clear"
                    name="event"
                    value="clearAttributes"
                    rendered="true"/>
                <spacer width="8"/>
            </contents>
            </cellFormat>

            <spacer width="8"/>

            <cellFormat wrappingDisabled="true" hAlign="left">
            <contents>
                <rowLayout>
                <contents>

                    <cellFormat wrappingDisabled="true" >
                    <contents>
                        <styledText styleClass="OraPromptText" text="Add Another"/>
                        <spacer width="10"/>
                    </contents>
                    </cellFormat>

                    <choice name="typeChoice">
                    <contents uix:childData="searchList@patchSearchData">
                        <option uix:text="searchChoice" uix:value="searchValue" uix:selected="selected"/>
                    </contents>
                    </choice>

                    <cellFormat wrappingDisabled="true">
                    <contents>
                    <spacer width="10"/>
                    <submitButton text="Add"
                        name="event"
                        value="addAttribute"
                        rendered="true"/>
                    </contents>
                    </cellFormat>

                </contents>
                </rowLayout>

            </contents>
            </cellFormat>
        </contents>
        </rowLayout>

        </contents>
        </tableLayout>

        </contents>
        </header>

<!-- spacer needed for Netscape layout -but distorts IE
        <spacer height="30"/>
-->
    </contents>
    </stackLayout>

    </case>
    </switcher>

    </contents>
    </stackLayout>


    <stackLayout>
    <contents>

<!-- spacer needed for Netscape layout -->
        <spacer height="10"/>

        <header text="Search Results">
        <contents>


        <stackLayout>
        <contents>

<!-- include the patch depot table -->
            <include baja:node="patchDepotTable"/>

        </contents>
        </stackLayout>

        </contents>
        </header>

    </contents>
    </stackLayout>

    </contents>
    </header>

    </contents>
    </form>
    <spacer height="20"/>

    </contents>
    </body>
    </contents>
    </pageLayout>

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

        <data xmlns="http://bali.us.oracle.com/cabo/marlin" name="getSearchType">
           <method class="oracle.sysman.eml.ecm.patch.PatchSearchData" method="getSearchType"/>
        </data>

       <data xmlns="http://bali.us.oracle.com/cabo/marlin" name="patchSearchData">
           <method class="oracle.sysman.eml.ecm.patch.PatchSearchData" method="populateSearchData"/>
        </data>

     </provider>
</dataScope>

</baja:content>

    <handlers>

      <event name="addAttribute">
        <method class="oracle.sysman.eml.ecm.patch.PatchSearchHandler"
          method="addSearchAttribute"/>
      </event>

      <event name="clearAttributes">
        <method class="oracle.sysman.eml.ecm.patch.PatchSearchHandler"
          method="clearAttributes"/>
      </event>
<!--

      <event name="doSearch">
        <method class="oracle.sysman.eml.ecm.patch.PatchSearchHandler"
          method="doSearch"/>
      </event>

-->

<!-- the following handlers are for the inserted depot table -->

      <event name="sort">
        <method class="oracle.sysman.eml.ecm.patch.PatchDepotHandler"
          method="doSort"/>
      </event>

      <event name="applyPatch">
        <method class="oracle.sysman.eml.ecm.patch.PatchDepotHandler"
          method="applySelectedPatch"/>
      </event>

      <event name="deletePatch">
        <method class="oracle.sysman.eml.ecm.patch.PatchDepotHandler"
          method="deletePatchConfirm"/>
      </event>

      <event name="viewDetails">
        <method class="oracle.sysman.eml.ecm.patch.PatchDepotHandler"
          method="viewDetails"/>
      </event>

      <!-- This handles the next/prev buttons in the admin table -->
      <event name="goto">
        <method class="oracle.sysman.eml.ecm.patch.PatchDepotHandler"
          method ="tableGoto"/>
      </event>


    </handlers>

</page>
