SD Components are available in the toolbox for SDPanel or WWSD .
Like Web Components, SD Components are controls that can contain SDPanel or WWSD objects without losing any of its characteristics and they can also run independently. This feature provides to designers of GeneXus Smart Device applications a high degree of reusability.
The main difference with Web Components is that SD components don't need any additional property like Type property (in Web Panels and Transactions).
In EventDay, suppose we want to view tweets while we are reading session content.
To do this, we create a Panel for Smart Devices called "SessionsWithTweets" and drag two Component controls from the toolbox.
Then, we must set both Component controls with WorkWith object for Sessions and the Panel for Smart Devices of Tweets as shown below:
Finally, the layout results as shown below.
Causes an object embedded into an SD Component to execute the Refresh event.
Return value: None
Note: Differences between Refresh methods/commands and how to use them:
- To refresh an object and all its components (including forms, grids, etc), use the Refresh command.
- To refresh the full screen, use the Refresh Form command.
- To refresh a Grid in an object, use the Grid Refresh method.
- To refresh an object embedded in a Component (and all its descendants) use the method described here.
The event trigger order in a Panel for Smart Devices with multiple Components is analogous to Detail and Sections in Work With for Smart Devices. If we have C1...CN Components in a Panel P, schematically the execution order will be:
Client Start (P)
When using multiple Components, the Action Bar behavior will be the combination of actions for each Component.
Continuing with the previous example, suppose we want to read the tweets minute. To do this, we must write an event associated with a Timer variable (invisible in SD Panel and with Chronometer control set) and refresh the screen when the elapsed time exceeds 60 seconds.
// Init timer
&Timer = 0
// If one minute elapsed, refresh component
If Mod(&Timer,60) = 0
Finally, substitute the invocation to Sessions on the dashboard, delete the Tweets node and run the application.
- SD Components controls cannot be drawn into a Grid Control.
- To synchronize the components at run-time programmatically, you can use Global Events.
- The Object property is available at design-time, and also available at run-time programmatically for Dynamic Component Creation
Objects Panel for Smart Devices, Work With for Smart Devices
SD Generators: iOS, Android
This property is available as of GeneXus 15
Dynamic Component Creation is available as of GeneXus 15 upgrade 12