Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

Registering a new MRU entity is done by following the steps below:


Specifying MRU Table Names

First, set the 'MruTableNames' application setting (comma-separated list) to include the table name(s) for which you want to register a new entity.
This can be done in SWAT either in the .restapplicationsettings file,


Or from the Application Settings Desktop (from UI, if available).


Service customization

The methods from RecordHdlHelper are used to specify the MRU item icon/description/key etc. Previously, those values were hardcoded in SWAT and were not customizable.

This was remedied by allowing the framework customers to customize this code through a new service: IEntityMetadataService. A default implementation is shipped with SWAT: LegacyEntityMetadataService.


Implementation

Customers would need to provide their own implementation of this service (either by implementing the service from scratch or overriding the default SWAT legacy implementation).


Declaration

You also need to specify which implementation of the service will be used:


IEntityMetadataService customization

The following methods can be customized from RecordHdlHelper through the service:

RecordHdlHelper MethodIEntityMetadataService MethodDescription
GetKeyFieldOfTableIdGetKeyFieldById
GetKeyFieldOfTableNameGetKeyFieldByName
GetTableNameFromIdGetNameById
GetInternalKeyOfTableGetInternalKeyFieldByName

GetTableIdFromName

GetIdByName


GetDescFieldsOfTable

GetDescriptionFieldsByName


GetOwnerOfTable

GetProductByName


IsTransField

IsTransField


GetForeignTablePropertiesOfField

GetLinkedEntityPropertiesOfField


GetForeignTableNameOfField

GetLinkedEntityOfField


GetContainerOfHdl

GetDetailsScreen

User for MRU details container

GetLabelOfHdl

GetLabel

User for MRU Label

GetIconOfHdl

GetIcon

User for MRU Icon

Repository Object Changes

Registering an MRU entity should be done when a details screen is opened.


In order to launch the screen (in our case, profilew) by clicking on a grid column, you need to do the following steps:

  • In the source grid, on the column  you click on, set the following attributes:
    • SUBTYPE: LAUNCH
    • VisualizationType: LINK
    • KeyField: *key field of the table* (in our case, selfHdl)

  • On the grid itself, set the following attribute
    • FolderWindowToLaunch: *detail screen to open on click* (in our case, profileW) - used to specify which screen opens on click; 


  • Finally, on the DSO used in the details screen, set the EventAfterFetch to the following: '$ akioma.registerMruEntryFromBE(self);'.
    This will call a function in the MruBT.cls which will do the registering in the MRU table. The data source needs its index to point to a valid record in order for the register to work.


The details screen should have the same PrimarySDO as the DSO used in the grid (dzuser).



After those steps are followed, the new MRU entities will show up in the MRU Data View.

Once you double-click on an item, it will open the screen specified above.


IMPORTANT: Double-clicking on an item from the MRU data View will only work if the data Source has one of the following fields: selfhdl, refhdl or childhdl.

  • No labels