IntelliJ IDEA 2018.2 Help

Managing Tiles

Tiles is a templating system to create a common look and feel for a Web application.

Tiles are managed through creating, editing, and removing tile definitions, which describe tile attributes and tile elements. Tile definitions are specified in the tiles-defs.xml which is created when you enable tiles support.

With IntelliJ IDEA, you can edit the tiles-defs.xml file in the Struts Assistant tool window, which provides two synchronized views: the Structure Tree and the Properties Table.

Tiles are removed in the same way as other Struts elements.

Editing a tile includes editing its properties and handling its attributes: forwards, exceptions, and set properties.

To create a tile

  1. Enable tiles support.

  2. Open tiles-defs.xml.

  3. To add a tile definition, add the <definition> element to tiles-defs.xml manually.

  4. Switch to the Struts Assistant tool window, tab Tiles. A new Definition node appears in the Structure Tree.

  5. Specify the attributes of the new tile in the Properties Table.

    Alternatively, right-click the tile in the tree and select Jump to Source or press F4. This will bring you to tiles-defs.xml where you can specify the tile's attributes manually. IntelliJ IDEA displays a template for specifying the mandatory attributes.

To remove a tile

  • Right-click the tile in the Structure Tree and select Remove Definition from the context menu.

To edit a tile

The elements are created, edited, and removed in the same way as common Struts elements.

  1. Select it in the Structure Tree.

  2. To edit the attributes of the tile, make the necessary changes in the Properties Table.

  3. To manage the elements of a tile, use the Structure Tree and the Properties Table.

Last modified: 20 November 2018

See Also