Chapter 5. Procedures

5.1. Basic Procedures
5.1.1. Linking Pages
5.1.2. Another Basic Procedure
5.2. Feature Dependent Procedures
5.2.1. Managed Beans
5.2.2. Feature Group B
5.3. Configuration Settings
5.4. Single Interface Many Options
5.4.1. Option A
5.4.2. Option B

This chapter discusses the numerous procedures used to achieve some of the more common goals in JBoss Developer Studio JSF Tools.

The following procedures describe basic tasks which do not implement any underlying features.

JBoss Developer Studio JSF Tools provides the facility to define links between pages in a graphical manner. This provides the user with a mapping of the project showing the existing links and a simple interface to enable the user to define further links.

Following the creation of at least two JSF Tools pages as described in Creating JSF Tools Pages, pages can be linked by defining a navigation rule. This is described in Creating connections or links between pages in JSF Tools

Procedure 5.1. Creating connections or links between pages in JSF Tools

  1. Preliminary procedure

    Prior to attempting to link pages, at least two pages should have been created as described in Creating JSF Tools Pages. Click on the Diagram tab to render the Diagram view.

    Result:

    The faces-config.xml file is opened in the Diagram view of its custom editor.

    Figure 5.1. JSF Tools faces-config.xml Editor - Diagram View


  2. Activate the Create New Connection icon

    Click on the Create New Connection icon of the Diagram View as highlighted in Figure 5.2, “JSF Tools faces-config.xml editor - Diagram View Toolbar - Create New Connection”. The mouse pointer graphic will change to a two-pronged power plug.

    Figure 5.2. JSF Tools faces-config.xml editor - Diagram View Toolbar - Create New Connection


  3. Generate the connection

    1. Click on the page representing the source of the link.

    2. Click on the page representing the destination of the link.

    Result:

    The pages are linked as displayed in Figure 5.3, “JSF Tools faces-config.xml editor - Diagram View Toolbar - Connection”. The link destination is indicated by the label above the connecting line (connector).

    Figure 5.3. JSF Tools faces-config.xml editor - Diagram View Toolbar - Connection


  4. View the tree

    Click on the Tree tab to view the changes made to the faces-config.xml file in a graphical representation.

    Result:

    Highlighting the welcome Navigation Case displays numerous options as shown in Figure 5.4, “JSF Tools faces-config.xml editor - Tree View - Connection”.

    Figure 5.4. JSF Tools faces-config.xml editor - Tree View - Connection


    The Navigation Case options available to the user are described in Table 5.1, “Navigation Case”


    The Advanced options available to the user are described in Table 5.2, “Advanced”


  5. View the source

    Click on the Source tab to view the changes to the faces-config.xml file.

    Result:

    The source (from-view-id) and destination (to-view-id) links have been defined in the file as shown in Figure 5.5, “JSF Tools faces-config.xml editor - Source View - Connection”.

    Figure 5.5. JSF Tools faces-config.xml editor - Source View - Connection


    Interface Options

    Futher details in regard to the options presented in Figure 5.4, “JSF Tools faces-config.xml editor - Tree View - Connection” are provided in the following procedures.

Section Feedback

JBoss Developer Studio JSF Tools provides the facility to .... This provides the user with ....

Following the task/procedure..... as described in Creating JSF Tools Pages, this further task/procedure can be performed. This is described in Creating connections or links between pages in JSF Tools

Procedure 5.2. (Feature) (Procedure) Name

  1. Preliminary procedure

    Prior to attempting to link pages, at least two pages should have been created as described in Creating JSF Tools Pages. Click on the Diagram tab to render the Diagram view.

    Result:

    The faces-config.xml file is opened in the Diagram view of its custom editor.

    Figure 5.6. JSF Tools faces-config.xml Editor - Diagram View


  2. Activate the Create New Connection icon

    Click on the Create New Connection icon of the Diagram View as highlighted in Figure 5.7, “JSF Tools faces-config.xml editor - Diagram View Toolbar - Create New Connection”. The mouse pointer graphic will change to a two-pronged power plug.

    Figure 5.7. JSF Tools faces-config.xml editor - Diagram View Toolbar - Create New Connection


  3. Generate the connection

    1. Click on the page representing the source of the link.

    2. Click on the page representing the destination of the link.

    Result:

    The pages are linked as displayed in Figure 5.8, “JSF Tools faces-config.xml editor - Diagram View Toolbar - Connection”. The link destination is indicated by the label above the connecting line (connector).

    Figure 5.8. JSF Tools faces-config.xml editor - Diagram View Toolbar - Connection


  4. View the tree

    Click on the Tree tab to view the changes made to the faces-config.xml file in a graphical representation.

    Result:

    Highlighting the welcome Navigation Case displays numerous options as shown in Figure 5.9, “JSF Tools faces-config.xml editor - Tree View - Connection”.

    Figure 5.9. JSF Tools faces-config.xml editor - Tree View - Connection


    The Navigation Case options available to the user are described in Table 5.3, “Navigation Case”


    The Advanced options available to the user are described in Table 5.4, “Advanced”


  5. View the source

    Click on the Source tab to view the changes to the faces-config.xml file.

    Result:

    The source (from-view-id) and destination (to-view-id) links have been defined in the file as shown in Figure 5.10, “JSF Tools faces-config.xml editor - Source View - Connection”.

    Figure 5.10. JSF Tools faces-config.xml editor - Source View - Connection


    Interface Options

    Futher details in regard to the options presented in Figure 5.9, “JSF Tools faces-config.xml editor - Tree View - Connection” are provided in the following procedures.

Section Feedback
Section Feedback

Description

As described in Section 4.1, “Managed Beans” a Managed Bean is a JavaBean which is created using dependency injection.

Configuring Managed Beans in JBoss Developer Studio JSF Tools

The faces-config.xml file editor Tree view as displayed in Creating connections or links between pages in JSF Tools provides an interface to create a Managed Bean without editing the file directly. This can be achieved according to Creating Managed Beans in JSF Tools.

Procedure 5.3. Creating Managed Beans in JSF Tools

  1. Access the Managed Bean dialog

    Click on the Managed Bean label of the faces-config.xml Editor as displayed in Creating connections or links between pages in JSF Tools

    Result:

    The Managed Bean dialog is displayed.

    Figure 5.11. JSF Tools faces-config.xml Editor - Managed Beans


  2. Access the New Managed Bean dialog

    Click on the Add button to create a new Managed Bean.

    Figure 5.12. JSF Tools faces-config.xml editor - New Managed Bean


  3. Define the Managed Bean properties

    Define the Managed Bean properties according to the options displayed in Table 5.5, “New Managed Bean”



  4. Generate the Managed Bean

    Click the Finish button to generate the Managed Bean.

    Result:

    The faces-config.xml Tree view is displayed with the entered values.

    Figure 5.13. JSF Tools faces-config.xml editor - Tree View - Managed Bean details


  5. View the source

    Click on the Source tab to view the changes to the faces-config.xml file.

    Result:

    The Managed Bean Details have been added to the faces-config.xml file as shown in Figure 5.14, “JSF Tools faces-config.xml editor - Source View - Managed Bean”.

    Figure 5.14. JSF Tools faces-config.xml editor - Source View - Managed Bean


  6. Save the project

    Click on the Save icon or select File+Save to save the project.

    Interface Options

    Futher details in regard to the options presented in Figure 5.13, “JSF Tools faces-config.xml editor - Tree View - Managed Bean details” are provided in the following procedures.

Section Feedback
Description

As described in Section 4.3, “State Management” JavaServer Pages manages state by ....The following sections describe state management in relation to JBoss Developer Studio JSF Tools. The different types of state management include:

  • None

  • Request

  • Session

  • Application

Section Feedback
Section Feedback

OMMITTING THIS SECTION AS CONFIGURATION SETTINGS (DIRECT EDITING OF XML FILES) SHOULD BE ACHIEVABLE IN PROCEDURES (BASIC or FEATURE BASED ABOVE). WILL IMPLEMENT THIS SECTION IF IT IS DISCOVERED THAT THIS IS NOT THE CASE.

Section Feedback

OMMITTING THIS SECTION AS "SINGLE INTERFACE MANY OPTIONS" SHOULD BE COVERED IN THE "BASIC" OR "FEATURE BASED" PROCEDURES. THERE IS PERHAPS SCOPE TO RE-INTRODUCE THIS SECTION ON THE BASIS OF TABBED OPTIONS RENDERING A DIFFERENT INTERFACE. (TEMPLATETHREE.XML MOST LIKELY SUITS THIS INSTANCE).

Section Feedback