Generating automatic Popovers using Entity Summary

When a UI generated with K2BTools includes the description attribute associated with a transaction referenced in a FK contained in the base transaction, a link is automatically generated. This link redirects the user to the referenced transaction’s Entity Manager, allowing the user to navigate through all the entities in the application.

K2BTools also allows the developer to define “Popover” elements in these cases. This element is shown when the user hovers over the description attribute with its mouse pointer, and contains information about the referenced instance.

Popover in a Workwith

To generate these controls automatically for a transaction, the developer must add an “Entity Summary” node in the Entity Services instance for it. After defining how the entity summary is implemented, it will be included in all pattern-generated UIs referencing the transaction’s description attribute.

Creating an EntitySummary

Entity summary nodes can be created in two ways:

  1. Using the Create Summary Action
  2. Manually adding the node.

We will explain both cases below.

Using the “Create Summary” action

This is the most common scenario, in which the summary panel does not exist yet. K2BTools will create the summary panel using a suitable dynamic layout.

  1. In the Entity Services instance, in the “Transaction” Node, use the “Create Summary Panel” action.
    Creating a EntitySummary node.

  2. A selection of different dynamic layouts will appear. We recommended selecting the “DetailPopOver” panel.
    Selection of the Dynamic Layout of the Popover panel

  3. Map the dynamic layout attributes, and select which attributes will be shown.
    Entity Summary WebPanel

  4. Save the WebPanel
  5. Save the Entity Services instance.

Manually adding a summary panel

This scenario is useful when the WebComponent that the user wants to use as a Summary of the entity already exists.

  1. In the “Transaction” node add an “EntitySummary” node.
    Entity Summary Node

  2. Set a WebComponent in the SummaryPanel property
    Entity Summary Properties

The Web Component’s parm rule must be equal to the transaction’s primary key.

Automatic Popover generation

When the Entity Summary is defined for a transaction, a popover will be included automatically in all the UIs where its description attribute appears.The developer can disable this behavior for a particular interface using the “Automatic Summary Popover” property.

AutoPopover property