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
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.
The faces-config.xml
file is opened in the Diagram view of its custom editor.
Activate the Create New Connection icon
Click on 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.
icon of theGenerate the connection
Click on the page representing the source of the link.
Click on the page representing the destination of the link.
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).
View the tree
Click on the Tree tab to view the changes made to the faces-config.xml
file in a graphical representation.
Highlighting the welcome Navigation Case displays numerous options as shown in 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”
Table 5.1. Navigation Case
Field | Mandatory | Instruction | Description |
---|---|---|---|
From Outcome | yes | Enter the output | This corresponds to the output of the From View ID listed in Table link here . This output is generated by the To View ID page. |
From Action | no | This field | |
To View ID | yes | Enter the destination page. | The destination page will generate the From Outcome. |
Redirect | yes | Enter the redirect option |
The user has the option to redirect to another page from the destination page (To View ID). |
Description | no | Enter a description if required. |
The user has the option to enter a description for the Navigation Case. |
The Advanced options available to the user are described in Table 5.2, “Advanced”
Table 5.2. Advanced
Field | Mandatory | Instruction | Description |
---|---|---|---|
ID | no | Enter the ID | This corresponds to .... |
Display Name | no | Enter the display name | This field .... |
Small Icon | no | Enter the small icon. | The destination page will generate the From Outcome. |
Large Icon | no | Enter the large icon |
This allows ..... |
View the source
Click on the Source tab to view the changes to the faces-config.xml
file.
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”.
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.
faces-config.xml Tree View
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
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.
The faces-config.xml
file is opened in the Diagram view of its custom editor.
Activate the Create New Connection icon
Click on 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.
icon of theGenerate the connection
Click on the page representing the source of the link.
Click on the page representing the destination of the link.
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).
View the tree
Click on the Tree tab to view the changes made to the faces-config.xml
file in a graphical representation.
Highlighting the welcome Navigation Case displays numerous options as shown in 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”
Table 5.3. Navigation Case
Field | Mandatory | Instruction | Description |
---|---|---|---|
From Outcome | yes | Enter the output | This corresponds to the output of the From View ID listed in Table link here . This output is generated by the To View ID page. |
From Action | no | This field | |
To View ID | yes | Enter the destination page. | The destination page will generate the From Outcome. |
Redirect | yes | Enter the redirect option |
The user has the option to redirect to another page from the destination page (To View ID). |
Description | no | Enter a description if required. |
The user has the option to enter a description for the Navigation Case. |
The Advanced options available to the user are described in Table 5.4, “Advanced”
Table 5.4. Advanced
Field | Mandatory | Instruction | Description |
---|---|---|---|
ID | no | Enter the ID | This corresponds to .... |
Display Name | no | Enter the display name | This field .... |
Small Icon | no | Enter the small icon. | The destination page will generate the From Outcome. |
Large Icon | no | Enter the large icon |
This allows ..... |
View the source
Click on the Source tab to view the changes to the faces-config.xml
file.
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”.
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.
faces-config.xml Tree View
Section Feedback
Section Feedback
As described in Section 4.1, “Managed Beans” a Managed Bean is a JavaBean which is created using dependency injection.
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
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
The Managed Bean dialog is displayed.
Access the New Managed Bean dialog
Click on the
button to create a new Managed Bean.Define the Managed Bean properties
Define the Managed Bean properties according to the options displayed in Table 5.5, “New Managed Bean”
Table 5.5. New Managed Bean
Field | Mandatory | Instruction | Description |
---|---|---|---|
Scope | yes | Select the appropriate scope that applies to the Managed Bean | The available scope options are described in Table 5.6, “New Managed Bean - Scope” |
Class | yes | Enter the class associated with the Managed Bean | The class can be entered directly in the form class.BeanName or selected by clicking the New Java Class dialog to enable the user the enter the class details as displayed in Section 9.2.1, “Placeholder for a link”. | button. Clicking on the Class label will generate the
Name | yes | Enter an abbreviated name for the Managed Bean. | The name should reflect the type of bean being created and the Class property. |
Generate Source Code | no | Check this box to generate the source code automatically. |
The Managed Bean constructor will be generated. |
Table 5.6. New Managed Bean - Scope
Label | Description |
---|---|
request | The bean persists for the request only |
session | The bean persists for the duration of the session |
application | The bean persists over the scope of the application |
none | The bean does not persist |
Generate the Managed Bean
Click the
button to generate the Managed Bean.
The faces-config.xml
Tree view is displayed with the entered values.
View the source
Click on the Source tab to view the changes to the faces-config.xml
file.
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”.
Save the project
Click on the Save icon or select +Save to save the project.
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.
faces-config.xml Tree View
Section Feedback
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
The "None" scope in JBDS is implemented by.......
Procedure goes here. NEED TO FIND A SUITABLE FEATURE->SUB-FEATURES topic to cover. Will come back to this.
Section Feedback
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