The following sections detail the installations required to use JSF Tools
and provide a quick overview of the tool and its use.
JBoss Developer Studio JSF Tools
3.0
requires the following installations to be present on the user's system:
OR ALTERNATIVE. I prefer the above as easier to maintain and the number of links not confined to two per product
Table 3.1. Required Installations
Product | Version | Installation Guide | Product Page |
---|---|---|---|
JBoss Developer Studio | 3.0.0.GA | JBDS Installation Guide | JBDS Product Page |
< Java Runtime Environment > | < version > | < link to installation > | < link to product page > |
< Application A > | < version > | < link to installation > | < link to product page > |
Section Feedback
JBoss Developer Studio Project Creation describes the steps to create a new project in JBoss Developer Studio.
Procedure 3.1. JBoss Developer Studio Project Creation
Access the New Project Dialog
Select
→ →The New Project screen displays.
The General folder in the above image can be expanded by clicking on the arrow highlighted in the image. This same technique can be applied to expanding folders in the Package Explorer view and is the technique used throughout this document.
Continue by defining the JSF Tools
project type as described in JSF Tools Project Creation:
Procedure 3.2. JSF Tools
Project Creation
Define the Project Type
Click on the JSF Project label by expanding the → folders.
Click the
button to proceed.The New JSF Project - Create JSF Project screen displays.
Define the Project Attributes
Define the JSF Project Attributes according to the options displayed in Table 3.2, “New JSF Project”
Table 3.2. New JSF Project
Field | Mandatory | Instruction | Description |
---|---|---|---|
Project Name | yes | Enter the project name. | The project name can be any name defined by the user. |
Use default path (tickbox) | no | Click this option to define the project location as the default path. | The path defaults to the Workspace location. |
Location | yes | Enter the path to the project. | The path will default to the Workspace location if the Use default path (tickbox) is selected. |
JSF Environment | yes | Select the JSF Environment from the available options |
The JSF Environment defines the base JSF implementation to use as described in Table 3.3, “New JSF Project - JSF Environment”. |
Template | yes | Select the Template from the available options |
The project can be based on a template as described in Table 3.4, “New JSF Project - Template”. |
Table 3.3. New JSF Project - JSF Environment
Label | Description |
---|---|
JSF 1.1.02- Reference Implementation | This implementation..... |
JSF 1.2 | This implementation... |
JSF 1.2 with Facelets | This implementation... |
Table 3.4. New JSF Project - Template
Label | Description |
---|---|
JSFBlankWithoutLibs | This template defines a blank project without JSF support to avoid conflicts arising from the target server JSF configuration. |
JSFKickStartWithoutLibs | This template defines a demonstration project without JSF support to avoid conflicts arising from the target server JSF configuration. |
Access the Web sub-screen
Click Next to proceed.
The New JSF Project - Web screen displays.
Define the Web Attributes
Define the JSF Project Web Attributes according to the options displayed in Table 3.5, “New JSF Project - Web”
Table 3.5. New JSF Project - Web
Field | Mandatory | Instruction | Description |
---|---|---|---|
Servlet Version | yes | Select the j2ee servlet version to base the project on. | The servlet version can be chosen from the options as listed in Table 3.6, “New JSF Project - Web - Servlet”. |
Context Path | yes | Define the path to the project. | The path defaults to the project name. |
Runtime | yes | Select the runtime used to compile the application. | The runtime defaults to the runtime corresponding to the Target Server. Other runtimes can be added by clicking the Runtime dropdown list. | button next to the
Target Server | no | Select the server to which the application will be deployed |
Selecting from one of the preconfigured servers will result in the server jar files being included in the project's classpath. New servers can be added by clicking the Target Server dropdown list. This procedure is decribed in <procedureLinkHere> |
Table 3.6. New JSF Project - Web - Servlet
Label | Description |
---|---|
2.3 | This servlet version supports/introduced ..... |
2.4 | This servlet version supports/introduced ..... |
2.5 | This servlet version supports/introduced ..... |
Open the Web Development perspective.
Click the
button to complete the project setup.A dialog will appear prompting the user to open the relevant perspective.
Click the
button to display the Web Development perspective.The project is configured and the Web development perspective is displayed.
Section Feedback
The main configuration file faces.config.xml
can be opened in a custom editor. Accessing the JSF configuration file editor details the steps to open the editor.
Procedure 3.3. Accessing the JSF configuration file editor
Access the Editor
Access the faces-config.xml file by expanding the → → folders in the Package Explorer view
Double click on the faces-config.xml file.
The faces-config.xml
file is opened in its custom editor, defaulting to the Diagram view
For an example of the use of the Diagram view to create pages refer to Section 3.2.3, “Creating JSP Pages”
Explore the different views
Click on the Tree tab to render the Tree view.
The faces-config.xml
file is opened in the Tree view
Click on the Source tab to render the Source view.
The faces-config.xml
file is opened in the Source view
Section Feedback
JSP pages can be created in JBoss Developer Studio by using the Diagram view of the faces-config.xml
editor.
Procedure 3.4. Creating JSF Tools
Pages
Access the Diagram view
Once the steps outlined in Step 1 of Accessing the JSF configuration file editor are completed, click on the Diagram tab to render the Diagram view.
The faces-config.xml
file is opened in its custom editor, defaulting to the Diagram view
Access the New View dialog.
Right click within the editor and select Rule from the displayed menu.
The New View dialog is displayed.
Enter the file's relative path and chosen name in the From-View-ID: textbox.
Define the Project Attributes
Select the page Template to use from the available options displayed in Table 3.7, “Template”
Table 3.7. Template
Label | Description |
---|---|
Blank | Generates a blank page. |
FaceletBlank.xhtml | Generates a blank facelet page. |
FaceletCommon.xhtml | Generates a facelet page according to the most common features. |
FaceletForm.xhtml | Generates a facelet form. |
JSFBasePage | This is the default value. This setting generates a base JSF page to which the user can add content. |
JSPRedirect | Generates a Java Server pages redirect page. |
Generate the page.
Click the
button to generate the required page.The page is displayed graphically in the Diagram view.
Begin working with the page.
Access the login.jsp file by expanding the → → → folders in the Package Explorer view.
The pages folder corresponds to the path defined by the user in the New View dialog of Figure 3.10, “JSF Tools New View - JSF process View”.
Double click on the login.jsp file.
The login.jsp
file is opened in the JSP editor.
The file can now be edited and previewed in a single screen by clicking the Visual/Source tab or edited and previewed individually by clicking the Source and Preview tabs respectively. For further details regarding the JSP editor refer to Section 9.2.1, “Placeholder for a link”
Section Feedback
A description of a "rapid view" following on from the previous view or possibly a new "rapid view" that is considered important enough to discuss.
Procedure 3.5. (Feature) (Procedure) rapid view
Define the Project Type
Click on the JSF Project label by expanding the → folders.
Click the
button to proceed.The New JSF Project - Create JSF Project screen displays.
Define the Project Attributes
Define the JSF Project Attributes according to the options displayed in Table 3.8, “New JSF Project”
Table 3.8. New JSF Project
Field | Mandatory | Instruction | Description |
---|---|---|---|
Project Name | yes | Enter the project name. | The project name can be any name defined by the user. |
Use default path (tickbox) | no | Click this option to define the project location as the default path. | The path defaults to the Workspace location. |
Location | yes | Enter the path to the project. | The path will default to the Workspace location if the Use default path (tickbox) is selected. |
JSF Environment | yes | Select the JSF Environment from the available options |
The JSF Environment defines the base JSF implementation to use as described in Table 3.9, “New JSF Project - JSF Environment”. |
Template | yes | Select the Template from the available options |
The project can be based on a template as described in Table 3.10, “New JSF Project - Template”. |
Table 3.9. New JSF Project - JSF Environment
Label | Description |
---|---|
JSF 1.1.02- Reference Implementation | This implementation..... |
JSF 1.2 | This implementation... |
JSF 1.2 with Facelets | This implementation... |
Table 3.10. New JSF Project - Template
Label | Description |
---|---|
JSFBlankWithoutLibs | This template defines a blank project without JSF support to avoid conflicts arising from the target server JSF configuration. |
JSFKickStartWithoutLibs | This template defines a demonstration project without JSF support to avoid conflicts arising from the target server JSF configuration. |
Access the Web sub-screen
Click Next to proceed.
The New JSF Project - Web screen displays.
Define the Web Attributes
Define the JSF Project Web Attributes according to the options displayed in Table 3.11, “New JSF Project - Web”
Table 3.11. New JSF Project - Web
Field | Mandatory | Instruction | Description |
---|---|---|---|
Servlet Version | yes | Select the j2ee servlet version to base the project on. | The servlet version can be chosen from the options as listed in Table 3.12, “New JSF Project - Web - Servlet”. |
Context Path | yes | Define the path to the project. | The path defaults to the project name. |
Runtime | yes | Select the runtime used to compile the application. | The runtime defaults to the runtime corresponding to the Target Server. Other runtimes can be added by clicking the Runtime dropdown list. | button next to the
Target Server | no | Select the server to which the application will be deployed |
Selecting from one of the preconfigured servers will result in the server jar files being included in the project's classpath. New servers can be added by clicking the Target Server dropdown list. This procedure is decribed in <procedureLinkHere> |
Table 3.12. New JSF Project - Web - Servlet
Label | Description |
---|---|
2.3 | This servlet version supports/introduced ..... |
2.4 | This servlet version supports/introduced ..... |
2.5 | This servlet version supports/introduced ..... |
Open the Web Development perspective.
Click the
button to complete the project setup.A dialog will appear prompting the user to open the relevant perspective.
Click the
button to display the Web Development perspective.The project is configured and the Web development perspective is displayed.
Futher details regarding the feature
are available in the following procedures:
Section Feedback
Section Feedback