1 Context
The user interface of the toolbar is displayed directly above the object in the form of a button. We are now adding a toolbar so that we can edit the information of the objects within the grid in the same way as with the Ribbon Bar.
2 Result
3 Step by step guide
3.1 Create a menu function
đź’ˇ As for the ribbons please try to create again a new function, a menu structure and name it properly
Create a new menu function. Fill in the following information:
- 👋 Function Name -> “ToolbarSaveButton”
- 👋 Function Type -> “Akioma.Swat.Studio.Menu.Action”
- 👋 Function Code -> “ToolbarSaveButton”
- 👋 Icons at magnify glass -> “fad fa-save”
- 👋 Module -> “MyAppModule”
- 👋 In the section “Properties” fill in the following attributes
- Action Type -> “PUBLISH”
- Action Parameter -> “recordSave” (changed records will be saved by that)
- Action Target -> TABLEIO
- Toggle the checkbox “Is Big”
3.2 Create the menu structure
In the menu section (Design → Menus - Select the BuildOne Application):
- 👋 Select the top node of your application “MyOrderApplication”
- 👋 Select now in the “New Entry” section in the dropdown the item type “Menu” and click on “Add as sublevel” and call it:
- “MenuName” -> “MyToolbars”
- “Menu Structure Code” ->”MyToolbars” and select “Save”
- 👋 Select now your newly created “MyToolbars” group and add an “Item” also by selecting it in the dropdown and clicking the button “Add as sublevel”
- 👋 Here you can now search for your function “ToolbarSaveButton”, fill in a Lable like “Save ”and save it.
3.3 Add the toolbar to your screen
- đź‘‹ Go back to the designer of your screen
- 👋 Search in the section “Library of Objects” for the “SimpleSwatToolbar” and drag and drop it on the “ItemGrid_<yourName>”
- 👋 Navigate to the “flow designer” and link the “SimpleSwatToolbar” to the object “ItemGrid_<yourName>”
- 👋 Choose the “Link type” -> “TableIO” and select “Save”
- 👋 Click on the “SimpleSwatToolbar” and search in the section “Attributes” for the attribute “ToolbarKey” and insert the following value “MyToolbars” 💡 (Menu structure code of your toolbar group, but here without #)
- đź‘‹ Click on the 'ItemGrid_<yourName>' and select the attribute value 'ENABLED'.
- đź’ˇ And again, there are various actions that are already defined in the standard. We can look at these in the SWAT framework and use them