Skip to main content

Overview

Header

Level: intermediate

Keywords: application modules, entity-cart, create-entity, recent-entities, samo-reports, user-messages

The result: overview of application modules used in SAMO

Application module is a feature expressing certain navigation or other business function available for chosen application part. This chapter gives you an overview of using application modules (app modules) in SAMO Projects. On this page you can find basic information about app modules. Every app module has a more detailed description on a separate page.

Types of modules

Each app module is defined by an icon in the upper application toolbar.

application toolbar

Basically there are two types of app modules, dropdown and dialog. Type is configured by "detailType" property in the app module configuration.

Dropdown type means, that after clicking the icon, dropdown menu shows you some results / items (e.g. samo-recent-entities-app-module). But dialog app module type initializes a dialog with specific functionality (e.g. samo-reports-app-module).

You can use native app modules (samo-reports-app-module) from Dynamic-App or create your own app-module using intents and bussines action (this needs to be further prooved).

Integration of application modules to your project

First of all, you need to define app modules. There are two ways how to do it:

  1. in separate files

    Each module can be configured in a seperate file (reports.json) and stored in the project metadata structure. To do this, you need to create appModules folder in your application part (AP) folder and then, import the folder to your dashboard using applicationModules property. See How to set up new application part? chapter.

    applicationModules property - configuration example
    {
    "applicationModules" : "<$importDirectoryRecursive:../common/appModules,./appModules>"
    }

    The configuration above is used at AP level and means that all modules from common folder and modules from appModules folder defined just for this AP will be imported.

  2. by using applicationModules property

    App module can be configured directly in applicationModules property on the dashboard page. See Samo-create-entity-app-module page.

tip

App modules can be defined for the whole project, application part, or just for a single page.

applicationModules at single page - configuration example
{
"title": "{tr:workOrders.allWorkOrders}",
"applicationModules": {
"reports": {
"type": "component:entity-modules/reports/samo-reports-app-module",
"security": {
"loggedIn": true
},
"detailType": "dropdown",
"detail": {
"module": {
"type": "component:entity-modules/reports/samo-reports-content",
"reportTypes": [
"wo_dueDate"
]
}
}
}
},
"module": {
"type": "component:entity-modules/browse/samo-browse",
"security": {
"loggedIn": true
},
"offline": {
"enabled": true,
"id": "workorder-workitems"
},
"defaultView": "map",
"wideDetail": true,
"listDisplayOptions": [
"auto",
"list3",
"table",
"tiles"
],
"entitiesGroup": "workOrders",
"additionalFilterProperties": [
"at_boWorkRealiz_is_cumulative",
"at_boWorkRealiz_propEndDate",
"at_boWorkRealiz_propStartDate",
"at_boWorkRealiz_realEndDate",
"at_boWorkRealiz_realStartDate"
],
"permittedOperations": {
"delete": true,
"edit": true,
"create": false
},
"map": {
"extends": "defaultWithLayers",
"context": "common"
},
"disableDefaultInsert": true,
"allowContinuousAction": false
}
}