NaturalONE Version 8.3.7
 —  Natural for Ajax  —

Getting Started with the Layout Painter

The Layout Painter is used to write the page layout.

This document contains the following exercises:


Creating a New Layout

You will now create a layout which is stored in the user interface component you have previously created.

Start of instruction setTo create a new layout

  1. In the Navigator view or in the Natural Navigator view, select the user interface component.

  2. From the File menu, choose New > Page Layout.

    The following dialog box appears:

    New layout

  3. Enter "helloworld" in the Page layout text box. This is the name of your layout definition.

  4. Enter a valid Natural object name in the Natural adapter text box. The name you specify here is used to create a Natural adapter object when you save the layout.

    In this tutorial, the name HELLO-A is used.

  5. On the Natural Page tab, select the template for the Natural page.

  6. Choose the Finish button.

    The Layout Painter appears.

    Layout painter

    Note:
    The file helloworld.xml is stored in the xml folder of the user interface component.

Top of page

Elements of the Layout Painter

The Layout Painter is divided into several areas:

When the Layout Painter is active, the additional menu Ajax Developer is shown in the menu bar.

Top of page

Previewing the Layout

The layout tree inside the Layout Painter already contains some nodes that were copied from the template that you chose in the dialog in which you specified the name of the page. When you modify the layout and want to find out how the current layout definitions are rendered on the page, you can preview the layout as described below.

The preview area is a sensitive area. When you select a control in the preview area (for example, the title bar), this control is automatically selected in the layout tree.

Start of instruction setTo preview the layout

Top of page

Viewing the XML Code

When creating the layout, you can view the currently defined XML code.

Start of instruction setTo view the XML code

Top of page

Opening the Ajax Developer Perspective

Ajax Developer provides its own perspective which provides just the views which are important for editing layouts.

Note:
It is not mandatory to use the Ajax Developer perspective; the same views are provided in the NaturalONE perspective.

Start of instruction setTo open the Ajax Developer perspective

  1. From the Window menu, choose Open Perspective > Other.

  2. In the resulting Open Perspective dialog box, select Ajax Developer and choose the OK button.

You can now proceed with the next exercise: Writing the GUI Layout.

Top of page