oracle.jbo.html.databeans
Class NavigatorBar
java.lang.Object
|
+--oracle.jdeveloper.html.WebBeanImpl
|
+--oracle.jdeveloper.html.DataWebBeanImpl
|
+--oracle.jbo.html.DataWebBeanImpl
|
+--oracle.jbo.html.databeans.RowsetNavigator
|
+--oracle.jbo.html.databeans.BaseNavigatorBar
|
+--oracle.jbo.html.databeans.NavigatorBar
- All Implemented Interfaces:
- DataWebBean, DataWebBean, WebBean, WebBean
- 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.setShowNavigationButtons(true);
myNavBar.setReleaseApplicationResources(false);
myNavBar.initialize(application,session, request,response,out,
"package3_Package3Module.EmpView");
myNavBar.render();
%>
</jsp:useBean>
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:
- Goto first record
- Goto previous record
- Goto previous page
- Goto next page
- Goto next record
- Goto last record
- Delete record (row)
- Commit changes to the database (COMMIT)
- Discard changes in the form (ROLLBACK)
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.
Fields inherited from class oracle.jbo.html.databeans.BaseNavigatorBar |
bShowNavigationButtons, buttons, ImageDir, isDetailMode, NAVIGATE_BASE, NAVIGATE_BROWSE, NAVIGATE_COMMIT, NAVIGATE_DELETE, NAVIGATE_EDIT, NAVIGATE_FINDFORM, NAVIGATE_FIRST, NAVIGATE_INSERT, NAVIGATE_LAST, NAVIGATE_NEXT, NAVIGATE_NEXT_PAGE, NAVIGATE_PREVIOUS, NAVIGATE_PREVIOUS_PAGE, NAVIGATE_ROLLBACK, NAVIGATE_VIEW, sTargetUrl |
Fields inherited from interface oracle.jdeveloper.html.WebBean |
contentFrameName, defaultCaboBase, defaultCaboImageBase, defaultImageBase, defaultJSPBase, defaultNLSFormat, JS_LIBRARIES, JS_NAMEID, JSButtonConstructorLib, JSCalendarConstructorLib, JSContainerConstructorLib, JSDataConstructLib, JSModalPageConstructorLib, JSTableConstructLib, JSToolbarConstructorLib, JSTreeConstructLib, JSUtilitiesLib |
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, 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, getRequest, getRequestVariable, getRequestVariable, getUniqueName, initBeanForJS, initBeanForJS, initBeanForJS, initialize, initialize, initialize, render, setRequestVariable, setRequestVariable |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface oracle.jdeveloper.html.DataWebBean |
clearDisplayAttributes, getApplicationName, getDisplayAttributeDefs, getDisplayAttributes, getDisplayFieldRenderer, getEditFieldRenderer, getRowSet, getViewObjectName, handleCommit, initialize, initialize, isAppStateful, setDisplayAttributes, setDisplayFieldRenderer, setDisplayFieldRenderer, setEditFieldRenderer, setEditFieldRenderer, setReleaseApplicationResources, setRowSet, shouldDisplayAttribute |
toolBar
protected Toolbar toolBar
NavigatorBar
public NavigatorBar()
internalInitialize
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 package3_AppModule1.properties 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 JSPApplicationRegistry.java in the jbohtmlsrc.zip file in the JDeveloper\lib directory.
-
- Specified by:
internalInitialize
in interface WebBean
- Overrides:
internalInitialize
in class BaseNavigatorBar
-
java.lang.Exception
populateToolBarFromCommands
public void populateToolBarFromCommands()
-
- Specified by:
populateToolBarFromCommands
in class BaseNavigatorBar
getContainer
public Toolbar getContainer()
render
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.
-
- Specified by:
render
in interface WebBean
- Overrides:
render
in class BaseNavigatorBar
-
java.lang.Exception
Copyright © 1997, 2003, Oracle. All rights reserved.