<%@ page info="Navigator" language="java" %> 
<%@page contentType="text/html;charset=UTF-8"%>
<%--
 ******************************************************************************* 
 * $RCSfile: FindParameter.jsp,v $
 *
 * Description: This file contains the left frame of the APOC Manager, the 
 *              navigation frame.
 *
 * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
 * Use of this product is subject to license terms.
 *
 *******************************************************************************
 --%>

<%@taglib uri="/WEB-INF/tld/com_iplanet_jato/jato.tld" prefix="jato"%> 
<%@taglib uri="/WEB-INF/tld/com_sun_web_ui/cc.tld" prefix="cc"%>

    <jato:useViewBean className="com.sun.apoc.manager.EntitiesFindParameterViewBean">

    <cc:header pageTitle="Find" copyrightYear="2003"
        baseName="com.sun.apoc.manager.resource.apoc_manager"
        bundleID="apocBundle"
        isPopup="true"
        onLoad="javascript:handleLoad(); return true">

        <script type="text/javascript">
        <!--
            var m_sOldFindString = "";
            var m_OpenerTop;
            
            function handleLoad() {
                document.forms[0]['EntitiesFindParameter.FindText'].focus();
                m_sOldFindString = document.forms[0]['EntitiesFindParameter.FindText'].value;
                m_OpenerTop=top.opener.top;
            }
            
            function handleSubmit() {
                document.forms[0]['EntitiesFindParameter.FindButton'].className='Btn1Dis';
                document.forms[0]['EntitiesFindParameter.FindButton'].disabled='true';

                var resultsForm = top.results.document.forms[0];
                var sEntityId   = resultsForm['EntitiesFindResult.EntityId'].value;
                var newDoc      = top.results.document.open("text/html", "replace");
                var sMarkup     = '<html><head><title>empty</title></head><body>';
                sMarkup += '<form name="ResultForm" method="post" action="../manager/EntitiesFindResult">';
                sMarkup += '<input type="hidden" name="EntitiesFindResult.EntityId" value="'+sEntityId+'" />';
                sMarkup += '<input type="hidden" name="EntitiesFindResult.FindString" value="*" />';
                sMarkup += '<input type="hidden" name="jato.defaultCommand" value="FindButton" />';
                sMarkup += '<input type="hidden" name="com_sun_web_ui_popup" value="true" />';
                sMarkup += '</form></body></html>';
                newDoc.write(sMarkup);
                newDoc.close();
  
                resultsForm = top.results.document.forms[0];
                resultsForm['EntitiesFindResult.FindString'].value=document.forms[0]['EntitiesFindParameter.FindText'].value;
                resultsForm.submit();
            }
            
            function handlePressedKey() {
                var sNewFindString =document.forms[0]['EntitiesFindParameter.FindText'].value;
                if (sNewFindString!=m_sOldFindString) {
                    m_sOldFindString=sNewFindString;
                    document.forms[0]['EntitiesFindParameter.FindButton'].disabled='';
                    document.forms[0]['EntitiesFindParameter.FindButton'].className='Btn1Def';
                }
            }
        // -->
        </script> 

        <cc:form name="ParameterForm"
            method="post"
            onSubmit="javascript: handleSubmit(); return false"
            defaultCommandChild="FindButton" >

            <cc:secondarymasthead name="Masthead"
                src="/apoc/images/popuptitle.gif"
                alt="APOC.masthead.altText"
                bundleID="apocBundle"/> 
            
                <cc:propertysheet name="FindParams" 
                    bundleID="apocBundle" 
                    showJumpLinks="false"/>

        </cc:form>

    </cc:header>

</jato:useViewBean> 
