JBoss.orgCommunity Documentation

Chapter 7. JSF Project Verification

In this chapter we'll discuss a possible verification that you can take advantage of.

Many different rules are checked for a JSF project that can be configured by selecting Window > Preferences from the menu bar, selecting JBoss Tools > Web > Verification from the Preferences dialog box and then expanding the JSF Rules node.

JSF Rules

Figure 7.1. JSF Rules


Suppose you are working in the Source viewer for a JSF configuration file as shown below:

Faces-config.xml File

Figure 7.2. Faces-config.xml File


While typing a class name, you might make a minor typo (like "jsfHello.PersonBean9" instead of "jsfHello.PersonBean" ). After saving the file, verification checks to make sure everything is correct and finds the error below:

Error in Source View

Figure 7.3. Error in Source View


Notice that the Package Explorer View shows a marked folder and a marked file where the error is.

You can place the cursor over the line with an error message and get a detailed error message:

Error Message

Figure 7.4. Error Message


Verification also checks navigation rules:

Checking Navigation Rules

Figure 7.5. Checking Navigation Rules


If you provide a page name that does not exist, verification will let you know about that:

Page Name Verification

Figure 7.6. Page Name Verification


You can always call up verification explicitly by right-clicking any element in the tree and selecting Verify from the context menu. This works from both the Tree and Diagram viewers for the JSF configuration file editor. You can also invoke verification from the Web Projects view. Below we are checking all of the elements in the configuration file.

Verify Command

Figure 7.7. Verify Command