Lesson 1: What is a Custom Control?
What is a custom control?
Generally, a custom control is a reusable, visible DataFlex component that can be added to any view or WebApp.
There are two sides to controls:
- DataFlex: The server side of the control that is a DataFlex class that provides the API’s that the application will work with.
Basic principles of custom controls…
- When an object is initialized it will serialize itself and be sent from the server to the client.
- Achieved in JSON format, which contains
- Object name
- Web property values
- Controls at the client can initiate server calls. This means that they can call on a specific method of a specific object from the client on the server. Parameters are passed along, and the WebApp framework assembles and sends the AJAX call.
- Property changes executed on the server will execute setter methods on the control. When the control’s web set web property is executed it will execute a setter method on the client-side portion of that control.