Template Component

SmartDevicesPlus adds the concept of “Template Components”.

A Template Component is a piece or a “part” of a template that can be individually applied in any Smart Devices Panel control.

Common SmartDevicesPlus templates require the full screen of the Smart Device Panel or WorkWith Smart Device to be completely applied which means user loses any customization done in the layout. This also means two templates can’t be applied in the same object, which made it difficult for user to combine several templates to create advanced screens such as the following:


In this example user wants to combine two different templates, on top of the screen is the “Pie chart” template, and in the bottom, the “Bars stacked chart” template.

SmartDevicesPlus templates components lets user to select one control from any SmartDevicesPlus template, and set it as the “template component”. This will allow user to apply that component individually on any SDPanel or WorkWithSD, without applying the entire screen’s template, making it possible to apply multiple component templates in the same layout. By default, the MainTable of any template is considered to be a component, but user can select which table inside the SmartDevicesPlus template will be treated as a component. Please check the Define template component section for further information.

To apply a component simply right click the target control and select the “Apply SmartDevicesPlus template to control” option. This menu option can be used in SmartDevicesPlus layouts tree editor:


And also in GeneXus default layout editor:


After “Apply SmartDevicesPlus template to control ” option is selected, SmartDevicesPlus template wizard is opened, in which user can select the template to be applied.


Important notes

  • Templates can only be applied to tables.
  • If the object has multiple layouts, the component will only be applied in the selected table of the current layout (e.g. if the object has 2 layouts, one for iOS and one for Android and user applies the template to a table in a iOS layout, the Android layout will not be modified)
  • When a component is applied, all the template's variables are copied, even if they are not used in the component.
  • When a component is applied, the template events are ignored, and therefore will not be copied.