2017 June Release

Defining menus, button bars and task panesPermanent link for this heading

With the Fabasoft app.ducx user interface language of Fabasoft app.ducx, you can define the following user interface elements in addition to forms and form pages:

  • menu items and menu bars
  • button bars and buttons
  • task panes

Defining a menuPermanent link for this heading

Fabasoft Folio distinguishes between two types of menus:

  • Menu items are mainly used for invoking use cases, but can also contain one or more menu items in order to allow the definition of menu hierarchies with sub-menus.
  • A menu root is required as the outermost container holding one or more menu items.

Defining a new menu itemPermanent link for this heading

Usually, menu items are simply referred to as menus. A menu can either reference a use case that is invoked when the user selects the menu item in the user interface, or it can contain one or more sub-menus to create a menu hierarchy.

The menu keyword is used to define a menu. It must be followed by the reference and curly braces.

Using the accel keyword, an accelerator object can be assigned to the menu to allow the user to use a shortcut for accessing the menu.

The alias group is used to insert a seperator before the menu entry.

Defining a menu for invoking a use casePermanent link for this heading

Syntax

menu reference {
  group = booleanvalue;
  accel = accelerator;
  usecase = usecase;
}


The use case that should be invoked when the menu is selected by the user must be referenced using the usecase keyword.

Please note that the app.ducx compiler automatically generates a menu item for use cases that are defined using the menu usecase keywords in the app.ducx use case language (for further information refer to chapter “

Note: Using this way to specify an expression implementation is discouraged since there is no context available to perform compiler features like type checking. Additionally all identifiers must be fully qualified.Defining a new menu use case”). Thus, there usually is no need to define a custom menu when using the menu usecase keywords to define use cases that should be invoked from a menu.

Example

userinterface APPDUCXSAMPLE@200.200
{
  import COOSYSTEM@1.1;
  import COODESK@1.1;

  menu MenuMarkAsShipped {
    group = true;
    accel = AccelCtrlO;
    usecase = MarkOrderAsShipped;
  }
}

Defining sub-menusPermanent link for this heading

Syntax

menu reference {
  accel = accelerator;
  entries = {
    menu,
    ...
  }
}


The entries keyword is used to create a hierarchical menu containing one or more sub-menus, which must be menu objects themselves. Multiple entries must be separated by commas.

Example

userinterface APPDUCXSAMPLE@200.200
{
  import COOSYSTEM@1.1;

  menu MenuSetOrderState {
    entries = {
      MarkOrderAsShipped,
      MarkOrderAsCompleted
    }
  }
}

Defining a new menu rootPermanent link for this heading

Syntax

menuroot reference {
  entries = {
    menu,
    ...
  }
}


A menu root is required as the starting point for context menus and menu bars.

The menuroot keyword is used to define a menu root. It must be followed by the reference and curly braces. In the menuroot block, the entries keyword is used for referencing the menu items.

Example

userinterface APPDUCXSAMPLE@200.200
{
  import COOSYSTEM@1.1;
  import COODESK@1.1;

  menuroot MenuRootOrderContext {
    entries = {
      MenuObjectUnshare,
      MenuSeparator,
      MenuObjectRead,
      MenuObjectEdit,
      MenuSeparator2,
      MenuSetOrderState
    }
  }
}

Extending an existing menuPermanent link for this heading

Syntax

extend menu reference {
  entries = {
    menu,
    ...
  }
}


The extend menu keywords are used to add menu items to an existing menu or menu root belonging to another software component.

Note: Menus belonging to another software component can only be extended with menu items belonging to your software component.

Cloud profile note: The extension of menus that belong to another non-friend software component is discouraged.

Example

userinterface APPDUCXSAMPLE@200.200
{
  import COOSYSTEM@1.1;
  import COODESK@1.1;

  // Add menu APPDUCXSAMPLE@200.200:CreateOrderWizard to the context menu
  // of contact persons

  extend menuroot MenuRootContext {
    entries = {
      CreateOrderWizard
    }
  }
}

Weighted menuPermanent link for this heading

Syntax

extend menu reference {
  weighted<..> = {
    ...
  }
}


Menu entries may be declared to be shown as buttons. In the menu extension block, weighted is used to assign menu entries.

Example

userinterface APPDUCXSAMPLE@200.200
{
  import COOSYSTEM@1.1;
  import COODESK@1.1;
  import COOATTREDIT@1.1;

  // Add menu MenuObjectEdit to the buttons
  // of MenuRoot

  extend menu MenuRoot {
    weighted<weightedmenuentry, COOATTREDIT@1.1:component> = {
      { MenuObjectEdit, APPDUCXSAMPLE@200.200 }
    }
  }
}

Defining a task panePermanent link for this heading

Syntax

taskpane reference {
  entries = {
    menu,
    ...
  }
}

A task pane is comprised of a list of menu items displayed in the left part of the quick view (see next figure).

Figure 16: Task panes displayed on the left-hand side of the quick view

The taskpane keyword is used to define a task pane. It must be followed by the reference and curly braces.

Nested within the taskpane block, the entries keyword is used to reference the menu items displayed on the task pane. Multiple entries must be separated by commas.

Example

userinterface APPDUCXSAMPLE@200.200
{
  import COOSYSTEM@1.1;
  import COODESK@1.1;

  taskpane TaskPaneCustomer {
    entries = {
      MenuObjectEdit,
      MenuMarkOrderAsShipped,
      MenuCreateInvoice
    }
  }
}

Extending an existing task panePermanent link for this heading

Syntax

extend taskpane reference {
  entries = {
    menu,
    ...
  }
}


The extend taskpane keywords are used to add menu items to an existing task pane belonging to another software component.

Note: Task panes belonging to another software component can only be extended with menu items belonging to your software component.

Cloud profile note: The extension task panes that belong to another non-friend software component is discouraged.

Example

userinterface APPDUCXSAMPLE@200.200
{
  import COOSYSTEM@1.1;
  import COOWF@1.1;

  // Add menu APPDUCXSAMPLE@200.200:MenuRerouteActivity to task pane
  // COOWF@1.1:TaskPaneActivity

  extend taskpane TaskPaneActivity {
    entries = {
      MenuRerouteActivity
    }
  }
}