<%@ page info="Manager" language="java" %> 
<%@page contentType="text/html;charset=UTF-8"%> 
<%--
 ******************************************************************************* 
 * $RCSfile: BrowseTree.jsp,v $
 *
 * Description: This file displays a tree browsing dialog
 *
 * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
 * Use of this product is subject to license terms.
 *
 *******************************************************************************
 * Source Code Control System - Header
 *
 * $Header: 
 *******************************************************************************--%>

<%@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.BrowseTreeViewBean">

    <cc:header  name="HtmlHeader"
                pageTitle="Browse Tree Title" copyrightYear="2003"
                baseName="com.sun.apoc.manager.resource.apoc_manager"
                bundleID="apocBundle" 
                preserveFocus="true"
                preserveScroll="true"
                isPopup="true">
                
         <script type="text/javascript" src="/apoc/js/MainWindow.js"></script>   
                
         <script type="text/javascript">
         <!-- 
            function getRootEntityId() {
                return document.BrowseTreeForm['BrowseTree.HiddenRootEntity'].value;              
            }
            
            function getEntityId() {
                return '<cc:text name="SelectedEntity"/>' ;              
            }
         
            function getEntityType() {
                return '<cc:text name="SelectedEntityType"/>' ;              
            }
            
            function handleSelection(selectTag) {
                var form=document.BrowseTreeForm;
                if (form != null) {
                    form.action='/apoc/manager/BrowseTree?BrowseTree.DefaultHref=a&amp;';
                    form.submit();
                }
            }

            function entitySearchCallback(sHref) {
                var form        = document.BrowseTreeForm;
                var sEntityId   = extractByDelimiters("=", "&", sHref);
                form.action="/apoc/manager/BrowseTree?BrowseTree.DefaultHref="+sEntityId; 
                form.submit(); 
            } 
         -->
        </script>

        <cc:form name="BrowseTreeForm" method="post" onSubmit="javascript:return false;">
               <br>
                <table width="80%" align=center>
                    <tr>
                        <td>
                            <table width='100%' align=center>
                                <tr>
                                    <td height='30' align="right">
                                        <cc:button name="SearchButton"
                                            bundleID="apocBundle" 
                                            defaultValue="APOC.search.search"
                                            type="secondary"/>
                                            &nbsp;&nbsp;&nbsp;
                                    </td> 
                                </tr>
                                <tr>
                                    <td height='100' valign='top' class='TreBdy'>
                                        <cc:dtree name="Tree" bundleID="apocBundle" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
                <cc:hidden name="ShowSearch" defaultValue="true" />
                <cc:hidden name="HiddenRootEntity" defaultValue="" />
        </cc:form>
    </cc:header>
</jato:useViewBean>  
