New JSF Managed Bean Wizard: Name and Location

Use to create a new JSF managed bean.

In the Name and Location page, you have to set the following properties:

Element Description

Class Name

Specifies the JSF managed bean class name.

Project

Specifies the project in which the JSF managed bean will be located.

Location

Specifies a folder to house the JSF managed bean.

Package

Specifies a package within the location to house the JSF managed bean.

Created File

Specifies the file of the new JSF managed bean.

Configuration File

Specifies the Faces configuration file (faces-config.xml).

If you are using JSF 2.0, you do not need a configuration file. The managed bean is registered with the application using annotations. If you want to register the managed bean in a configuration file and your application does not have one, select the 'Add data to a configuration file' option and the wizard will create one for you.)

If you are using JSF 1.2 and your application does not have a configuration file, you cannot proceed with the wizard. To create a new configuration file, use the JSF Faces Configuration wizard. (Choose File > New File. Select the JavaServer Faces category and JSF Faces Configuration file type.)

Scope

Sets the scope of the JSF managed bean. Use the drop-down list to set the scope of the managed bean to one of the following:

    request

Request scope contains data specific to an individual server request, and is discarded when the service method returns. This is the most common scope usage in web applications, and is the default setting for the IDE.

    session

Session scope contains data specific to a user session.

    application

Application scope contains data for the entire web application.

    none

No scope is selected.

Bean Description

Sets a description for the JSF managed bean.



Related Topics

Developing Applications with NetBeans IDE,

Developing Applications with NetBeans IDE,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.