Point specifiers

When placing a region, you must specify how it is to be positioned. This is done by giving it a point specification. These points define locations on a page. This is a page with a region:

In this case, the ItemDetail Region is already visible on the page. Because of the size and current location of the ItemDetail region, there are nine points that can be referenced:

  • TopLeft, TopCenter, TopRight
  • LeftMiddle, CenterMiddle, RightMiddle
  • BottomLeft, BottomCenter, BottomRight
To place a region, you place one point of the new region at a point in the existing reference region. For example, placing the left middle of the new region to the right middle of the existing ItemDetail region will result in something like this:

It can be used by the scripting like this:

context.GetRegion("New Region").Place (LeftMiddle, "ItemDetail", RightMiddle)

A default location can be associated with the floating region using the Layout Editor. When the Place() API call is made and if a default is available in the layout, it will be used. If no placement location was given in the layout, this is used:

Place(CenterMiddle, "Main", CenterMiddle)

Because the floating regions are rendered even when not visible, it is important to avoid excessive database accesses resulting from complex UI in regions that may never be displayed. Avoid this problem by setting the Rendered? flag to false, which prevents the UI from rendering (and thus prevents the database accesses).

Placement is synchronous, unlike content rendering (style and data changes) and communication (alerts and events), which are asynchronous. In other words, the region is made visible and placed before the Place() API completes. After placement, transitions are left to run (if possible) asynchronously, while rendering and communication continues.