JBoss.orgCommunity Documentation
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.
Table 8.1. Pages Editor: Graphical View. Visual elements
Element | Description |
---|---|
![]() |
A yellow box with a solid border represents a |
![]() |
Pressing on the plus icon (
|
![]() |
A red cross in the upper left corner of the page box indicates that the view-id is not found in the project. |
![]() |
A gray box with a dashed border represents a page that has navigation (navigation rule) to but the page is not defined in the page.xml file. |
![]() |
An |
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.
Table 8.2. Pages Editor: Graphical View. Commands Icons
Icon Image | Command |
---|---|
![]() | Select a page element |
![]() | Marquee a page item |
![]() | Add a page relationship |
![]() | Add an exception rule |
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
Tree Mode provides a wider range of options and way to edit and modify the pages.xml file.
In this mode all elements and attributes of the page.xml file can be viewed and edited in a visual, user friendly way.
Seam Pages Editor provides Outline view support. You can explore the pages.xml using Outline view in two modes: Tree (
) and Diagram Navigation (
).
The Diagram Navigation mode of Outline view gives a birds-view of the layout to allow quick navigation for large-scale applications.
The Tree mode shows a tree for every element in the pages.xml file. You can get a quick overview of the whole file. When selecting an element in the Outline view the related element is highlighted in the Graphical, Tree or Source page of Seam Pages Editor.
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).
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.
Content Assist (Ctrl + Space) is available when using EL expressions in the following file formats:
JSP
XHTML
XML
JAVA
Notice, the code completion for the Seam components shows the proposals marked with Seam icon.
Content Assist is also available for the "jsfc " attribute, it lets you select from a list of possible attribute values. Whereas, JSF components appear above all other components in the list.
To get Code Assist available for an externally generated and imported project, don't forget to enable Seam features and configure Seam Settings in Section 10.2, “Project Preferences”.
While you are editing a components.xml file you can make use of the Content Assist for inserting needed elements.
The editor also makes code completion aware of methods/attributes for EntityQuery component.
Content Assist ( CA ) is available for Page Descriptors, .page.xml and page.xml files. Content Assist lets you easily compose a Page Descriptor file by suggesting elements and attributes. The suggestions are context dependent, which means that CA provides only the elements, attributes and in some cases values for the attributes, suitable in a particular place of your Page Descriptor.
Seam Pages Editor also supports code completion in EL-expressions suggesting you possible bean properties and methods.
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:
For more information on OpenOn, see the Visual Web Tools Reference Guide.
Using OpenOn in .xhtml files you can open:
components or properties resolved using an EL expression;
all actions described in pages.xml;
other .xhtml files that paths are specified in a current file;
image files that paths are set in the value property.The files will be opened in the default system graphical editor.
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:
inside <component> definition;
inside jbpm tags;
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:
@Out
@DataModel
@Role
@Roles
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.
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
→ → → → → 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.