Type to start searching...

Layout

Layouts arrange and bind controls for use in Portlets and Dialogs.

Description

A Layout is (usually) bound to a class in the business model for querying, viewing, creating or editing. (There is such thing as an unbound layout, but not common). It has a root container of a Composite, Tabs, or Switch in which it arranges a collection of controls (buttons, labels, grids, other composites, tabs, etc.)

Layouts need to be hosted in Portlets or Dialogs as they can't stand on their own. They do have their own menus, toolbars, actions, and displayed controls.

Properties
annotation : string

a1 ... aN: empty annotation names; must differ from domain model attribute names

attributes : string

Additional association paths to retrieve

augment : uiIdentifier

Name of a layout in the augmented metadata to insert after.

Valid values based on“string”.
:?[\p{L}_][\p{L}\p{N}_]*(:[\p{L}_][\p{L}\p{N}_]*)*

Value must begin with a letter. Case and length are not restricted. Letters and numbers are allowed. Colon is used as a scope separator. Spaces and other punctuation characters are not allowed.

caption : string

Caption text expression

class : string

Domain class relative to which the layout association paths are specified

code : string

Semantic color code: an association path or a constant, a positive integer or a string name.

description : string

Layout description, including its purpose

factory : string

New item factory event: <class> <event>|<event>

icon : string

Icon name expression

image : string

Header background image, an association or a constant: image:<name>|<absolute image url>. <name> specifies the full image name, either with full directory path or in the default directory.

privilege : string

The privilege required to load the Layout.

reader : string

Custom read event. [<class>]'<event> <arg1> ... <argN>

Specification: [<class>]'<event> <arg1> ... <argN>

<class> is an optional class symbol. When omitted, the items collection class is used. <event> is a read event symbol. <arg#> is an event argument value which can be either a constant or a scheme expression evaluating to a constant at run-time on the client, using special local variables provided by the framework: this (=controller), :node (=active node), :attributes, :where, :orderBy, :count, :offset, :xlock, or a UI initializer variable.

If arguments are not specified, a default list is supplied by the framework: :attributes :where :orderBy :count :offset :xlock

Examples:

a) Generate a request to 'readList event with default arguments: readList

b) Generate request to readList event with attributes, and orderBy argument values supplied by the framework. readList :attributes :orderBy

c) Generate request to Contact'readDetail with attributes supplied by the framework, and the contact argument calculated using (current-contact) client library function. Contact'readDetail :attributes (current-contact this :node)

In a library: (define (current-contact controller node) ... )

d) Generate request to 'read event with a constant attribute list: read '(lastName firstName) :where :orderBy :count :offset :xlock

size : FormSize

Icon size: m|3x.

Valid values based on“string”.
m
3x
style : string

Additional style name. Space separated list of class names.

Adds the class names to the outer div of the element to allow for custom css styling. To load mda portlet specific css rules, place them in mod/app/portlet/<portletName.css>. Replace ':' characters with '.' for namespace elements in the portletName.
Example


mod/app/portlet/mda.CategoryNavigator.css

Content
  • Sequence of:

    • Menu [0..1] - Main menu for the layout.

    • Toolbar [0..1] - Main toolbar for the layout.

    • Script [0..1] - Script to run during layout initialization

    • DataActions [0..1] - The collection of DataActions configured on a Layout.

    • UIActions [0..1] - Layout-level UI actions

    • ExceptionActions [0..1] - The set of exception actions defined for the layout.

    • Choice of:

      • Composite [1..1] - A container that displays its child views in columns - in the root of a layout.

      • Tabs [1..1] - A container that displays its child views in tabs - in the root of a layout.

      • Switch [1..1] - A container that displays only one of its child views at a time - in the root of a layout.

See
Portlet Dialog