Implementing a Toolbar in a JSP

You can include a toolbar in a custom JSP.

  1. Configure the required toolbar (administrative menu object) and toolbar items (administrative command objects) and connect them appropriately as described in Building a Configurable Toolbar.

  2. Include these style sheets in the JSP page:


    • emxUIDefault.css
    • emxUIMenu.css
    • emxUIToolbar.css

  3. Include these JavaScript files in the JSP page:


    • emxUIConstants.js
    • emxUICore.js
    • emxUICoreMenu.js
    • emxUIToolbar.js

  4. Insert the following section of JSP code into the JSP page.

    //************************************************************
    
    <%
    
    // String sToolbarName =  "<Name of the Toolbar Bar - menu object>";
    
    String sToolbarName =  "ENCRoutesToolBar";
    
    if ( (sToolbarName!= null))
    
    {
    
    %>
    
    <jsp:include page = "emxToolBar.jsp" flush="false">
    
        <jsp:param name="toolbar" value="<%=sToolBarName%>"/>
    
        <jsp:param name="objectId" value="<%= objectId %>"/>
    
    ?
    
    </jsp:include>
    
    <%
    
    }
    
    %>
    
    //**************************************************************
    

    In the above code, the main parameters to be assigned are:


    • sToolBarName: This is JSP page variable assigned to the name of the menu object, which is configured for the toolbar.
    • toolbar: This is jsp:include parameter, assigned to the name of the Toolbar menu object.

    To support the TipPage parameter, a JavaScript method, openWindow(strURL), must be defined in the JSP page which includes the emxToolbar.jsp.