The
provides you with a hierarchical view of the objects
in your application, both visible objects, such as components, and nonvisual
objects, such as RowSets, Validators, and Converters. To open the Navigator window, in the main toolbar, choose
Window > Navigating > Navigator.
The contents of this window change depending on what you are currently editing. When a visual JavaServer Faces page is open in Design mode in the Visual Designer, you see a node for the current page in the application
plus all the non-page managed beans, such as any session beans, application beans,
or request beans. The following list describes each node:
page-name node. The page-name node shows all the
objects on the current page, including nonvisual objects like database table
RowSets, Validators, and Converters. The runtime scope of each page is Request, meaning that information is
not saved between page requests.
The beans nodes. Bean properties are reflected here. You can edit the code for a bean in the
Java Editor by right-clicking the bean and choosing Edit Java Source. You typically add bean properties to a managed bean as described in Web Application Tasks: Quick Reference.
RequestBean node. This bean has a runtime scope of Request. A request is a single transmission of an HTTP request from the client to the server plus the corresponding response, which can be another page. In most cases, the request begins with the clicking of a button or a link and ends with the response of an HTML page to be displayed. Use this bean to store information that you need to preserve for only a single user request, such as information to pass to the next page. Any value that you store in the Request Bean disappears as soon as the request ends.
SessionBean node. By default, there is one session
bean for each project. This bean has a runtime scope of Session. Use this
bean to store information that you want to preserve
across page requests for a single user session, such as a user's logon information.
ApplicationBean node. By default, there is one
application bean for each project. This bean has a runtime
scope of Application and is where you store information that
you want to preserve across all user sessions, such as the contents of
a drop down list showing a list of all countries.
Using the Navigator Window
You can use this window as follows:
You can drop components directly from the Palette or
on
components in the Navigator window to determine the parent object. You can drop between components (when there are multiple
siblings) to control where in the list a child appears,
such as for the children of a grid panel.
You can reorder, and reparent, components by dragging them around within
the outline. For example you can drag a button from the form into a grid panel
component for example, or back out.
You can work with elements of a page that
are hard to select in the Visual Designer because they
are not visual or they are embedded in other components or simply referenced
by those components. For example, the checkbox group is composed of several other
components. If you select the checkboxGroup component in the
Navigator window you can bind it to a bean property or database that will provide
the options displayed in the component. For more information,
see Checkbox
Group Component.
Select a component's node and edit it. Right-click the node and choose Edit Java Source or Edit JSP Source. When a component node is highlighted in the Navigator window, you can edit its properties in the Properties window.
Right-click a component's node and work with the same contextual
menu choices as you would in the Visual Designer.
You can double-click any of the managed beans, such as SessionBean1, and edit the bean's source code. You typically do this when you want to add a property to the bean.