Embedded Layouts

You can create new layouts that can be embedded within other layouts with many, but not all, layout types. For example, if you have many layouts to create that are slightly different, but a significant number of the fields share the same characteristics, you can define a layout and embed it within many other layouts.

As well as embedding a layout within another layout, you can define alternate layouts that are rendered at run-time, according to a value of a field on the main layout. For example, you may want to embed different layouts with fields relevant to the collection of data about hardware and software, according to the user’s choice of Hardware, Software or Documentation, in a field on the main layout. When the user selects this field, the screen is refreshed, and the appropriate embedded layout will be generated. There are two methods for doing this. First there is the "Selected By Layout" method. Second there is the method to embed layouts using the "Visible If" technique.

Note: You must not place the same field on a layout, and on an embedded layout. Doing so would lead to unpredictable results and errors. As embedded layouts can be created independently of layouts, and they are interchangeable, this condition cannot be checked by ExtraView prior to execution of the rendering of the screens. When rendering the screens, if ExtraView detects that a field is used more than once over all the screen (including the embedded layouts), then a warning is generated.

Note: You should not place the same field on different embedded layouts of the same type. Fields on embedded layouts are unique across the layout type being used.

Note: It is recommended that any embedded layout that you place on a layout should span all columns of the layout. An embedded layout should never start in any but the first column of a layout. Other placement may work, but there is no guarantee that the layout will render correctly. This is due to limitations of HTML and how different browsers will render complex HTML. You should always test your embedded layouts in all the target browsers that your organization uses.

Note: All the layouts of a single type must be contained within the same Business Area and Project for which the template for the embedded layout is created. For example, if you create a series of embedded layouts all dependent upon the same field for selection, these embedded layouts must all reside in the same Business Area and Project.

Note: An embedded layout should not contain the parent field of an allowed value relationship, if the child field is contained in the outer layout. Both parent and child fields can be in the same layout or the parent can be in the outermost layout with the child in the embedded layout.

Note: With the exception of Related Issue Display layouts, you cannot embed a layout within a Quicklist layout.

Note: You cannot embed a layout within a Related Issue Display layout.

Note: As a general rule, you should never embed a layout within itself, causing recursion or a condition which will be an infinite loop. ExtraView cannot detect this condition until runtime, and this can cause significant system and behavior problems requiring the restart of the application server.

Embedded Layout Types

  • Simple embedded layouts - In this instance a layout type that you create is embedded inline within another layout
  • "Selected By" layouts - These embedded layouts are driven by a tab or list field. A template layout is created and this is used to create a different layout that will appear under each tab or list value. This is done with the LAYOUT SELECTED layout cell attribute. For most purposes, "Visible If" layouts are simpler to configure
  • "Visible If" layouts - Layout types that you create are all embedded within a layout. Each layout is initially hidden with a FIELD/LAYOUT VISIBLE IF layout cell attribute. This attribute references a driving field, usually a tab or list field such that each of the embedded layouts is made visible one by one, according to the value of the tab or list field
  • Repeating row layouts - These layout types must be embedded within another layout. You cannot embed another layout within a repeating row layout
  • Related issue layouts - These layout types must be embedded within another layout. You cannot embed another layout within a related issue display layout.

"Visible If" Layouts

As an example, you may want three cells on a layout to be displayed according to the value selected in a list box. You may set this up with embedded layouts, or with the layout cell attribute named FIELD/LAYOUT VISIBLE IF on each of the three cells.

A guide to implementing the most effective method is to consider the following:

  • If you have several or many fields to make visible, embedded layouts are processed a little faster, resulting in higher performance for the end user
  • It takes more effort to set up embedded layouts, and conditional attributes have the advantage of being simpler to set up and maintain
  • Once set up, embedded layouts can be re-used on both add and edit screens, whereas conditional attributes must be set up for each layout.

"Selected By" Layouts

This feature allows the administrator to design a series of layouts, which are generated within a global layout such as the Add or Edit Issue screen. Each of these layouts is based upon the value of a trigger field. For example, you may want to generate a series of fields within a layout, dependent on the category of issue you are adding. Thus, if you want to render a different embedded layout for each of Software, Hardware and Documentation, which are different values of UDF named ISSUE_TYPE, with a title of Issue Type, then you will choose the Issue Type field.

When the user selects the value of Issue Type, the embedded layout is refreshed, displaying the layout that is tied to the value of the trigger field. One usability feature is that if you have a form within a browser window that is longer than the height of the window, and you choose a different value for the trigger field, ExtraView will place the new embedded layout to display at the top of the screen, thereby preventing the situation where the new layout may be hidden beneath the bottom of the window.

The sequence of administrative operations required to create selectable embedded layouts is as follows:

  1. First, decide on the field that is to be used to trigger the rendering of the different embedded layouts. For example, if you want to render a different embedded layout for each of Software, Hardware and Documentation, which are different values of the Issue Type field, then you will choose the Issue Type field.
  2. From the Administration Site Configuration tab, select Create and Maintain Layout Types feature. The following screen appears:


    Layout Types

  3. Press the button to add a new layout type to ExtraView. You must name this layout with the fixed name of the trigger field. In our example, this is ISSUE_TYPE. The title should be Issue Type and the type must be Screen
  4. Now navigate to the Design Center
  5. Navigate to the Business Area and if appropriate, the Project within which you want to use the embedded layouts
  6. Next, select the layout type you just created from the Add a new layout for the entire system select list. Once again, in our example, this is named Issue Type
  7. Give this new layout a title and a description. This layout is only used as a reference to create the different embedded layouts. You do not need to add any fields to this layout. Simply Save this layout. This now serves as a template for each embedded layout you create. Any fields that are contained in this layout will be propagated to the selectable embedded layouts created in the remaining steps of this procedure
  8. Return to the initial Design Center screen
  9. If you are adding the embedded layouts to the Add screen, edit the appropriate add screen. Place the Issue Type field on the maing grid of the layout, if it is not already there
  10. Now place the embedded layout on the main grid, by dragging it from the list of Layouts. In our example, the layout is named LAYOUT.ISSUE_TYPE. You should be sure to give the embedded layout a suitable colspan within the layout. ExtraView will suggest that it can do this for you at this step, creating an embedded layout that will span the width of the entire layout
  11. Step 12 will be repeated for each value of the Issue Type field (in our example, Software, Hardware and Documentation). We will be creating and saving an embedded layout for each of these values, from the template created in step 7
  12. Make sure the embedded layout is selected on the main grid and click on the Newlayout cell attribute button. Add a layout cell attribute of LAYOUT SELECTED, for the field named Issue Type and then select the appropriate value for each required embedded layout (often there is an embedded layout for every value of Issue Type, but that is not necessary). For example, if you want an embedded layout for the Software value of Issue Type, choose Software and Return to the layout
  13. Save the layout and Return. You should see the new layout in the list of layouts, with the Select by field containing the title of Issue Type, and the Select by Value containing the values that were specified in the SELECTED attributes
  14. You may repeat steps 12 and 13 for other values as your needs change (or you add values to the selector UDF) in the future. From the Design Center you can directly proceed to editing the layout cell attribute of the LAYOUT.ISSUE_TYPE field, add the selected value, and then Save the layout. The new embedded layout will be automatically created for each new value added to the LAYOUT SELECTED attributes
  15. You can delete selectable embedded layouts as you would delete any other layout. However, you should not delete the “template” layout created in step 7, or you will not be able to add new selectable embedded layouts of that type.

Positioning Embedded Layouts

Within ExtraView, a design decision was made to always align the columns of an embedded layout with the columns of the layout that embeds it. This provides the most pleasing presentation of fields to a user. However, the limitations of HTML are such that this works precisely when an embedded layout is defined to start in the first column of the layout within which it is created. If the embedded layout has multiple rows (and most do), then the second and subsequent rows will always be rendered from the first column of the second and subsequent row, which may cause a misalignment. To prevent this, set a rowspan on the field at the left of the embedded layout, such that it spans one row greater than the number of rows in the embedded layout.

To see this effect, see the following two layouts and the differing rendering of the results:

Layout 1


Layout definition with embedded layout

Note that this layout leads to the wrong rendering of the embedded layout, where the embedded layout titles appear correctly, but the data rows are offset to the leftmost column.


Rendering of layout

Layout 2


Layout definition with padded field in first column

In this layout, not that the OWNER field was set to have a rowspan of 2. This corrects the position of the embedded layout rows so they align correctly.


Rendering of layout