JBoss.orgCommunity Documentation
This chapter tells about Seam Editors and their features.
Visual Page Editor fits perfectly for authoring view Seam pages. The major features of VPE are listed in Main Features of Seam Editors
You can also read more about Visual Page Editor in Visual Page Editor chapter of "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.
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 7.1. Pages Editor: Graphical View. Visual elements
Element | Description |
---|---|
![]() | A yellow box with a solid border represents a <page> element. |
![]() |
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 <exception> is represented by a blue box with a orange diamond. |
Pageflow relations are shown with gray arrows, when you select a relationship the arrow is changed to orange.
On the lefthand 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 7.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 file
Rightclicking on a <page> element calls a context menu where you can choose the following options if you click on the New menu item:
Rule defines a new navigation rule for the element
Param adds a <param> tag to 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 and selecting an element 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.
To get Code Assist available for an externally generated and imported project, don't forget to enable Seam features and configure Seam Settings in 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.
OpenOn let's 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 also supported in Page Descriptors(page.xml). You can Ctrl + left click on the bean to open navigate to the bean you clicked on.
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.
In the preferences page for Seam Validator you can see and modify the validator behavior. Go to Window > Preferences > JBoss Tools > Web > Seam > Validator 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 which will execute all the active WTP validations.