1 Context:
The Menus and Actions explained
The Action Designer explained
The Menu Designer explained
2 Result:
3 Step by step guide:
3.1 Create an action
- Navigate to the section “Logicalize” -> “Actions” and select “+ Create Action”
- Fill in the following information and name it RibbonSaveFunction
- Function Name -> “RibbonSaveFunction”
- Function Type -> “Akioma.Swat.Studio.Menu.Action”
- Function Code -> “GeneralSaveRibbon”
- Function small Image (by clicking at the magnify glass)-> “fad fa-save”
- Function large Image (by clicking at the magnify glass)-> “fad fa-save”
- Module -> “MyAppModule”
- Select “Confirm” and a second configuration tab appears
- In the Action Designer fill in the following parameters
- Type of Action -> “PUBLISH” (second card in the panel)
- Event to be published -> “recordSave”
- Target Link -> TABLEIO
- Select “Save”
Shows which SCL class will be used in the background
This is the internal identifier for this action
We use PUBLISH if this action writes into DSOs
Through this changed records will be saved. We could also add here a function or other parameter
The connection type for our action
3. 2 Create the menu function
- Now navigate to “Design” -> “Menus”
- Filter for "Show root menus" by ticking the checkbox and selecting "BuildOneApplication".
- Click on the menu structure node “BuildOne Application” to select it
- Make sure in the section “New Entry” (in the ribbon at the top) the category “Menu” is selected and click on “Add as sublevel”
- Fill in the following information:
- MenuName → MyOrderApplication
- Menu Structure Code → MyOrderApplication
- Select your new group “MyOrderApplication”
- Now select the item type “Menu”, in the “New entry” block of the ribbon in the dropdown, and click on “Add as sublevel” and call it:
- MenuName -> MyRibbon
- Menu Structure Code -> MyRibbon and select “Save”
- Select now your newly created “MyRibbon” group and add a “Block” by also selecting it in the dropdown, then clicking the button “Add as sublevel” and name it “CRUD-Operations”
- Now select your newly created “Block” group and add an “Item” by also selecting it in the dropdown and clicking the button “Add as sublevel”
- Fill in the following information and Save it
- Label → Save
- Action → RibbonSaveFunction
- Turn on the “Big Icon” toggle
- Now go back to the Screen Designer of your OrderOverview screen.
This will be the group for the menus in our app
This will be the menu for our ribbon
This will be the group for our ribbon
This controls the size of the button in the ribbon
This will be the button in our ribbon
3.3 Integrate the ribbon in the screen
- Search for the “SimpleSwatRibbon” in the panel “Library of Objects” and drag and drop it on the “OrderGrid_<yourName>”
- Navigate to the Flow View and link the “SimpleSwatRibbon” to the object “OrderForm_<yourName>” and choose the “Link type” -> “TableIO”
- Click on the “SimpleSwatRibbon” and search in the panel “Attributes” for the attribute “ToolbarKey” and insert the following value “#MyRibbons” (Menu structure code of your ribbon group)
Now launch your screen and test the new save function, by changing a value in the the order form, e.g. in the “Term” column. Once you changed a value, you see unsaved changes. Now, click on your new save function. Violá, your changes are saved!
There are various actions that are already defined in the standard. We can look at these in the SWAT framework and use them as needed
4 Explanation:
We added the ability to edit records in a predefined screen. With this ribbon bar, you can make these changes directly in the screen.