1 Context:
A design template is a pre-defined group of objects that constitite a sceen and itsâ set parameters. This allows recurring design patterns to be readily available, incresing development speed. At the beginning, when we created our first screen, we used such a template. In this exercise we will create our own.Â
2 Result:
3 Step by step guide:
- Navigate to âDesignâ -> âScreensâ and select the âCreateâ button in the toolbar
- Name it âOverviewScreenTemplateâ, add a description and select the âModuleâ -> âMyFirstAppâ
- Select the Layout -> âWindow(simple)â
- Click on âConfirmâ to save it and open the screen in the Screen Designer
- Search in the âAttributeâ panel the attribute âLayoutâ and change it to â3Tâ
- Search in the tab âLibrary of objectsâ for the following objects and place them on the âDesign Viewâ panel:
- âdesignPhGridâ -> âPanel Aâ
- âdesignPhFormâ -> âPanel Bâ
- âdesignPhGridâ -> âPanel Câ
- âdesignPhToolbarâ -> âPanel Aâ
- âdesignPhDatasourceâ -> âAdd it to the screen title two timesâ
- Connect them in the âFlow viewâ tab in the following order:
- â<This Object>â -PrimaryDSO-> âdesignPhDatasourceâ âData-> âdesignPhGridâ
- âdesignPhDatasourceâ âData-> âdesignPhDatasource2â âData-> âdesignPhGrid2â
- âdesignPhDatasourceâ âDisplay> âdesignPhFormâ
- âdesignPhToolbarâ -TableIO> âdesignPhGridâ
- Navigate to âDesignâ -> âScreensâ and search for the attribute âTemplate Objectâ in the âList of Screensâ and set it to âtrueâ for your newly created template screen and select âsaveâ
We select an empty template as we are going to define our own one
Now the next time you create a screen your template will appear in the template overview and you can start working on that basis of this template
4 Explanation:
If you notice that the same design patterns occur repeatedly during your development, you can save a lot of time by creating and utilizing templates. Moreover, you can use this feature to create mockups quickly, which you can discuss with the client, in order to make changes swiftly.