JBoss.orgCommunity Documentation

Chapter 8. Seam Editors

8.1. Visual Page Editor
8.2. Seam Pages Editor
8.2.1. Graphical Mode
8.2.2. Tree Mode
8.2.3. Outline Support for Seam Pages Editor
8.3. Seam Components Editor
8.4. Main Features of Seam Editors
8.4.1. Content Assist
8.4.2. Content Assist for Page Descriptors
8.4.3. OpenOn
8.4.4. Seam Validation

This chapter tells about Seam Editors and their features.

Visual Page Editor is a great tool to use for the authoring of Seam pages. The major features of VPE are listed in Section 8.4, “Main Features of Seam Editors”

You can also read more about Visual Page Editor in the Visual Web Tools Reference Guide.

Seam Pages Editor provides a handy way to edit the pages.xml file.

You can edit the pages.xml file in three modes: Graphical, Tree and Source.

Seam Pages Editor supports synchronization with Package Explorer.This means that while renaming files in the Package Explorer all the changes immediately affect the pages.xml file.

Graphical mode provides you with a set of visual tools to organize your project pageflow, exception handling etc.


The Graphical part of the editor has some visual elements. The table below shows graphical representation of the elements and explains their meanings.


Pageflow relations are shown with gray arrows, when you select a relationship the arrow is changed to orange.

On the left hand side of the Graphical view of Seam Page Editor you can find a toolbar with a set of icons for the most frequently used commands.


Context menus are also available when you click either on an item or a blank space.

A context menu called on a blank space of the diagram provides the following options:

  • Page creates a new page element on the diagram

  • Exception creates a new exception element on the diagram

  • Auto Layout formats the layout of the diagram automatically

  • Select Element calls the Select Element Wizard with a filter to perform a quick search through the pages.xml file

Right clicking on a selected <page> element calls a context menu where you can choose the following options if you click on the New menu item:

  • Rule opens the Add Navigation Rule dialog in which you can browse your project for a view page to set the view-id in the navigation rule and specify render or redirect navigation options

  • Param calls a dialog box where you can define a parameter (using the <param> tag) for the <page> element

When editing components.xml a structured tree editor is available in addition to pure source editing. It has a graphical view (Tree tab) and source (Source tab).


Note:

You can view and edit components.xml and other xml files directly in the Project Explorer and Properties sheet without opening the components.xml editor.


In this chapter you will know what Seam Editors features are and how to work with them.

OpenOn lets you easily navigate through your project without using the Package Explorer or Project Explorer. After pressing Ctrl + left click (or just F3) you will see a corresponding method or class.


OpenOn is available for the following files:

Note

For more information on OpenOn, see the Visual Web Tools Reference Guide.

OpenOn in XHTML files

Using OpenOn in .xhtml files you can open:

OpenOn in XML files

OpenOn is also supported in Page Descriptors (.page.xml and pages.xml). OpenOn allows you to navigate to Java beans as well as to view pages. You can Ctrl + left click on a bean or on view page file (for example, a XHTML file) to navigate to the file you clicked on.


If you use Rule-based authorization with Drools in your Seam application you can apply OpenOn in components.xml to open the files containing rule definitions in the "rule-files" tag.


You can also use OpenOn to open jBPM components that are described in Seam component descriptor. Two places where it works are available:

OpenOn in Java files

OpenOn is also supported in seam components where In annotation is presented. After pressing Ctrl + left click on the seam component specified in @In you will get the possibility to open the file where the component is declarated as well as all of the seam components where it is used in the next declarations:


Validation of various possible problematic definitions is implemented for Seam applications.

If an issue is found it will be shown in the standard Problems View.


Note:

Please note, only files within source path and web content are validated, meaning temporary files or test files are not included.

In the preferences page for Seam Validator you can see and modify the validator behavior. Go to WindowPreferencesJBoss ToolsWebSeamValidator and select the severity level for the optional Seam Validator problem.


On WTP projects validation are enabled by default and thus executed automatically, but on normal Java projects you will have to go and add the Validation builder of your project . It is available in the properties of your project under Validation.


The validations can be run manually by clicking Validate via the context menu on your project (folder or file inside your project) which will execute all the active WTP validations. Following to the project's preferences under Validation it's possible to enable/disable any validator.

It's also possible to turn off the validation for some resource (a file, folder) inside your project via the Exclude Validation context menu option.


As a result, if you've turned off the validation for a folder (or file), it is put to the excluded group of the Validation filters and be ignored during the validation.