Containers
The purpose of containers is to hold and render the components inside them, and also to provide events for you to handle.
Top-Level
Top-level containers are those containers that are not meant to be placed inside another container. Hence, instead of an owner, they are passed the $application
global variable when instantiated. For example:
global $application;
$page = new Page($application);
Tip: You will usually subclass them to include event handlers in their definition.
These are some of the top-level containers available on the RPCL:
- Page
- A webpage.
- MPage
- A screen in a mobile application.
- DataModule
- A container for invisible components used to store common reusable code, to later include it in several webpages.