Business Components

Class NavigatorBar


public class NavigatorBar
extends BaseNavigatorBar

The NavigatorBar Data Web Bean renders itself as an Oracle toolbar. It is responsible for providing a toolbar UI for navigating a RowSet's rows.

This Web Bean aggregates the oracle.jbo.html.databeans.RowsetNavigator. Navigation requests such as "Next Page", that are activated by clicking the buttons on the toolbar, are passed to RowsetNavigator. RowsetNavigator processes the requests and performs the designated action.

JDeveloper's JSP Element wizard instantiates the NavigatorBar class in a jsp:useBean tag in a .jsp file. Along with the class, the wizard also includes an ID and a scope declaration set to request. If you change the scope to any other value, you will have to handle possible multithreading issues.

The definition of a navigation bar provided by the wizard includes the methods: setShowNavigationButtons, setReleaseApplicationResources, initialize, and render. For example:

 <jsp:useBean   class="oracle.jbo.html.databeans.NavigatorBar"  id="myNavBar"
                  scope="request" >

	   myNavBar.initialize(application,session, request,response,out,

The value assigned to the setReleaseApplicationResources method determines whether the Application Module is released after the NavigatorBar Data Web Bean processes it. Typically, the value should not be set to true unless this is the last Web Bean to be processed in the JSP page.

The rendered navigation bar UI provides buttons that perform these actions:

The code for the navigation bar should be placed prior to any Data Web Beans that will be displaying the RowSet being operated on by the NavigatorBar. For example, you would place a NavigatorBar Data Web Bean before the View Current Record Data Web Bean. This is important since the NavigatorBar can adjust the current row in the RowSet and the other Data Web Beans need to visualize the correct row after it has been placed in context by the NavigatorBar.

The NavigatorBar class aggregates oracle.jdeveloper.jsp.wb.Toolbar to re-use its HTML generation functionality. You can add your own toolbar items to the end of the navigation bar. For example, you can add toolbar items that provide additional URLs that can be navigated by using the toolbar. You can access the aggregated toolbar by using the getContainer() function.

Field Summary
protected  Toolbar toolBar
Fields inherited from class oracle.jbo.html.databeans.BaseNavigatorBar
Fields inherited from class oracle.jdeveloper.html.DataWebBeanImpl
attributeRenderers, bReleaseApplication, dispAttrs, qView, sApplication, sRowSetName
Fields inherited from class oracle.jdeveloper.html.WebBeanImpl
application, ctx, out, page, request, response, session
Constructor Summary
Method Summary
 Toolbar getContainer()
 void internalInitialize()
          Initializes the EditForm object to have access to the important objects of the JSP.
 void populateToolBarFromCommands()
 void render()
          Renders the HTML toolbar on the JSP page.
Methods inherited from class oracle.jbo.html.databeans.BaseNavigatorBar
addButton, addButton, addButton, addDefaultEntries, addSeparator, createToolBarButtonForCommand, getButton, getImageDir, getTargetUrl, isDetailMode, setDetailMode, setImageDir, setShowNavigationButtons, setTargetUrl, showNavigationButtons
Methods inherited from class oracle.jdeveloper.html.DataWebBeanImpl
clearDisplayAttributes, getApplicationFromContext, getApplicationName, getAttributeLabel, getDisplayAttributeDefs, getDisplayAttributes, getDisplayFieldRenderer, getEditFieldRenderer, getRowFromKey, getRowKey, getRowSet, getViewObjectName, handleCommit, initialize, initialize, initialize, isAppStateful, releaseApplicationResources, releaseApplicationResources, setDisplayAttributes, setDisplayFieldRenderer, setDisplayFieldRenderer, setEditFieldRenderer, setEditFieldRenderer, setReleaseApplicationResources, setRowSet, shouldDisplayAttribute
Methods inherited from class oracle.jdeveloper.html.WebBeanImpl
generateScriptSrc, getCookie, getOut, getRenderingContext, getRequest, getRequestVariable, getUniqueName, initBeanForJS, initialize, initialize, initialize, render, setRequestVariable
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


protected Toolbar toolBar
Constructor Detail


public NavigatorBar()
Method Detail


public void internalInitialize()
                        throws java.lang.Exception
Description copied from class: BaseNavigatorBar
Initializes the EditForm object to have access to the important objects of the JSP.

The value of the sRowSet parameter has the format Package_AppModule.ViewObject and refers to the property file used to create the Application Module and the View Object name. For example, if you see the following entry for the sRowSet parameter:

initialize(.., "package3_AppModule1.DeptView");

The Data Web Bean will try and find in the CLASSPATH to create the Application Module. This is done only once per session. Once the Application module is instantiated, the Data Web Bean locates the View Object by calling the findViewObject('DeptView') on the Application Module. You can see the implementation by looking at in the file in the JDeveloper\lib directory.

internalInitialize in class BaseNavigatorBar
Tags copied from class: BaseNavigatorBar
application - the JSP page's ServletContext.
session - the JSP page's HttpSession.
request - the JSP page's HttpServletRequest.
response - the JSP page's HttpServletResponse.
out - the JSP page's JspWriter.
sRowSet - the name of the application's property file and View Object.


public void populateToolBarFromCommands()
populateToolBarFromCommands in class BaseNavigatorBar


public Toolbar getContainer()


public void render()
            throws java.lang.Exception
Renders the HTML toolbar on the JSP page. This method is the main entry point where the rendering of the toolbar actually happens.
render in class BaseNavigatorBar

Business Components