JBoss.orgCommunity Documentation

Chapter 3. Editors

3.1. Graphical Editor for Struts Configuration Files
3.1.1. Diagram View
3.1.2. Tree View
3.1.3. Source View
3.2. Graphical Editor for Tiles Files
3.2.1. Create New Tiles File
3.2.2. Tree View
3.2.3. Diagram View
3.2.4. Source
3.3. Graphical Editor for Struts Validation Files

In this chapter we'll introduce you to featured graphical editors for specific Struts files such as Struts Configuration files, Tiles files and Struts Validation files.

First, let's dwell on the Struts Configuration file editor.

This editor has three views with different representation of struts-config.xml: Diagram, Tree and Source. The views can be selected via the tabs at the bottom of the editor. Any changes made in one view are immediately visible when you switch to any other view.

Now, we'll consider every view in more detail.

Here, you'll know how to make use of the special graphical editor for Tiles configuration files.

The editor has three main views: Tree, Diagram and Source. The views can be selected via the tabs at the bottom of the editor. Any changes made in one view are immediately visible when you switch to any other view.

Before we consider each view of the editor, let's look at the way of creating new Tiles files.

Providing full support for development Struts applications JBoss Tools comes with a visual validation editor. To open the editor double-click on the validation file or if you don't have it create a new one.

To create a new validation file, right click any folder in Project Explorer and select File > New > Other... from the context menu and then JBoss Tools Web > Struts > Validation File.


The validation editor works with five modes: Formsets, Validators, Constants and standard Tree and Source that you can easily switch over using tabs at the bottom of the editor.

The Formsets view shows forms and their elements on the left side and the dialogue for defining their validation rules on the right side.


The Constants view let you set constant values for your validation rules.


The validation file can also be viewed in a Tree view.


At any point you have full control over the source by switching to the Source view. Any editing in this view will immediately be available in other views of the editor.


You can also open your own custom or Struts-standard validation-rules.xml file.

The Validators view shows the validation rules for a selected validator. You can of course add your own rules.


Here are the validation rules shown in the Source mode.