Business Components

oracle.jbo.html.databeans
Class BaseNavigatorBar

java.lang.Object
  |
  +--oracle.jdeveloper.html.WebBeanImpl
        |
        +--oracle.jdeveloper.html.DataWebBeanImpl
              |
              +--oracle.jbo.html.databeans.BaseNavigatorBar
Direct Known Subclasses:
JSNavigatorBar, NavigatorBar

public abstract class BaseNavigatorBar
extends DataWebBeanImpl

A Class class.


Field Summary
protected  boolean bShowNavigationButtons
           
protected  ToolBarButtonContainer buttons
           
protected  java.lang.String ImageDir
           
protected  boolean isDetailMode
           
protected  RowsetNavigator nav
           
static int NAVIGATE_BASE
           
static int NAVIGATE_BROWSE
           
static int NAVIGATE_COMMIT
           
static int NAVIGATE_DELETE
           
static int NAVIGATE_EDIT
           
static int NAVIGATE_FINDFORM
           
static int NAVIGATE_FIRST
           
static int NAVIGATE_INSERT
           
static int NAVIGATE_LAST
           
static int NAVIGATE_NEXT
           
static int NAVIGATE_NEXT_PAGE
           
static int NAVIGATE_PREVIOUS
           
static int NAVIGATE_PREVIOUS_PAGE
           
static int NAVIGATE_ROLLBACK
           
static int NAVIGATE_VIEW
           
protected  java.lang.String sTargetUrl
           
 
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
BaseNavigatorBar()
          Constructor
 
Method Summary
 void addButton(int nCommand)
           
 void addButton(int nCommand, java.lang.String sUrl)
           
 void addButton(int nCommand, java.lang.String sImageUrl, java.lang.String sUrl, java.lang.String sToolTipText)
           
 void addDefaultEntries()
          Adds the default entries to the toolbar.
 void addSeparator()
           
 ToolBarButton createToolBarButtonForCommand(int nCommand)
           
 ToolBarButton getButton(int nCommand)
          Return a button from the Toolbar given the command id.
 java.lang.String getImageDir()
          Returns the name and path of the image root directory where all of the toolbar's internal navigation images reside.
 java.lang.String getTargetUrl()
          Returns the URL to which the HTML FORM generated by this bean will be posted.
 void internalInitialize()
          Initializes the EditForm object to have access to the important objects of the JSP.
 boolean isDetailMode()
          Returns true if the toolbar is operating on and displaying options only for a detail table.
abstract  void populateToolBarFromCommands()
           
 void render()
          Renders the HTML toolbar on the JSP page.
 void setDetailMode(boolean bDetail)
          Allows the suppression of options on a toolbar.
 void setImageDir(java.lang.String sDir)
          Specifies the name and path of the image root directory where all of the toolbar's internal navigation images reside.
 void setShowNavigationButtons(boolean bShow)
          Enables or disables the display of the navigation buttons on the navigation bar.
 void setTargetUrl(java.lang.String sUrl)
          Specifies the URL to which the HTML FORM generated by this bean will be posted.
 boolean showNavigationButtons()
          Returns true if the navigation buttons are displayed on the navigation bar.
 
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

NAVIGATE_BASE

public static final int NAVIGATE_BASE

NAVIGATE_FIRST

public static final int NAVIGATE_FIRST

NAVIGATE_PREVIOUS

public static final int NAVIGATE_PREVIOUS

NAVIGATE_PREVIOUS_PAGE

public static final int NAVIGATE_PREVIOUS_PAGE

NAVIGATE_NEXT_PAGE

public static final int NAVIGATE_NEXT_PAGE

NAVIGATE_NEXT

public static final int NAVIGATE_NEXT

NAVIGATE_LAST

public static final int NAVIGATE_LAST

NAVIGATE_DELETE

public static final int NAVIGATE_DELETE

NAVIGATE_COMMIT

public static final int NAVIGATE_COMMIT

NAVIGATE_ROLLBACK

public static final int NAVIGATE_ROLLBACK

NAVIGATE_EDIT

public static final int NAVIGATE_EDIT

NAVIGATE_INSERT

public static final int NAVIGATE_INSERT

NAVIGATE_FINDFORM

public static final int NAVIGATE_FINDFORM

NAVIGATE_BROWSE

public static final int NAVIGATE_BROWSE

NAVIGATE_VIEW

public static final int NAVIGATE_VIEW

sTargetUrl

protected java.lang.String sTargetUrl

ImageDir

protected java.lang.String ImageDir

nav

protected RowsetNavigator nav

isDetailMode

protected boolean isDetailMode

bShowNavigationButtons

protected boolean bShowNavigationButtons

buttons

protected ToolBarButtonContainer buttons
Constructor Detail

BaseNavigatorBar

public BaseNavigatorBar()
Constructor
Method Detail

showNavigationButtons

public boolean showNavigationButtons()
Returns true if the navigation buttons are displayed on the navigation bar.

Returns:
true if navigation buttons are displayed; false otherwise.

setShowNavigationButtons

public void setShowNavigationButtons(boolean bShow)
Enables or disables the display of the navigation buttons on the navigation bar.

Parameters:
bShow - true to display navigation buttons; false to suppress display of navigation buttons.

isDetailMode

public boolean isDetailMode()
Returns true if the toolbar is operating on and displaying options only for a detail table.

Returns:
true if the toolbar is showing options only for a detail table.

setDetailMode

public void setDetailMode(boolean bDetail)
Allows the suppression of options on a toolbar. If you are using multiple toolbars on a single page, it makes sense to hide some of the options for the detail tables. Some of these actions should be displayed only once. For example, if you have multiple toolbars on a page, you might want to set setDetailMode(true) to suppress the Commit and Rollback options on all but one toolbar.

To suppress the Commit and Rollback options in this way, the session must also be stateful. That is, in the application's .properties file, the IsStateLessRuntime option must be set to false.

Parameters:
bDetail - true to suppress Commit and Rollback toolbar options; false to display these options.

setTargetUrl

public void setTargetUrl(java.lang.String sUrl)
Specifies the URL to which the HTML FORM generated by this bean will be posted.

Parameters:
sUrl - target URL of the "post HTML FORM" operation.

getTargetUrl

public java.lang.String getTargetUrl()
Returns the URL to which the HTML FORM generated by this bean will be posted.

Returns:
target URL of the "post HTML FORM" operation.

setImageDir

public void setImageDir(java.lang.String sDir)
Specifies the name and path of the image root directory where all of the toolbar's internal navigation images reside. The Web Bean will prepend this path to all images it tries to retrieve.

Parameters:
sDir - image root directory containing the toolbar's internal navigation images.

getImageDir

public java.lang.String getImageDir()
Returns the name and path of the image root directory where all of the toolbar's internal navigation images reside. The Web Bean will prepend this path to all images it tries to retrieve.

Returns:
image root directory containing the toolbar's internal navigation images.

internalInitialize

public void internalInitialize()
                        throws java.lang.Exception
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.

Overrides:
internalInitialize in class DataWebBeanImpl
Parameters:
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.

addSeparator

public void addSeparator()

addButton

public void addButton(int nCommand,
                      java.lang.String sImageUrl,
                      java.lang.String sUrl,
                      java.lang.String sToolTipText)

addButton

public void addButton(int nCommand,
                      java.lang.String sUrl)

addButton

public void addButton(int nCommand)

getButton

public ToolBarButton getButton(int nCommand)
Return a button from the Toolbar given the command id.

addDefaultEntries

public void addDefaultEntries()
Adds the default entries to the toolbar. These entries include navigation buttons and transaction buttons. Typically, the default buttons include:

Note: The COMMIT and ROLLBACK options will be suppressed if you declare setDetailMode(true), and set the IsStateLessRuntime option to false in the application's .properties file.


populateToolBarFromCommands

public abstract void populateToolBarFromCommands()

createToolBarButtonForCommand

public ToolBarButton createToolBarButtonForCommand(int nCommand)

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.
Overrides:
render in class WebBeanImpl

Business Components