The field component template html will be expressed like:
<servoydefault-textfield name="dataFieldFormatNumber" svy-model="model.dataFieldFormatNumber" svy-api="api.dataFieldFormatNumber" svy-handlers="handlers.dataFieldFormatNumber" svy-apply="handlers.dataFieldFormatNumber.svy_apply" svy-servoyApi="handlers.dataFieldFormatNumber.svy_servoyApi"/> |
which is expanded by angular to real html.
Every webcomponent gets a number of parameters/objects pushed to the webcomponent instance:
- svy-model: object contains all the properties set in the designer or at runtime (if they are data driven like a dataprovider property), it reflects the model object defined in the spec.
- svy-handlers: object contains all the event functions that are set in the designer like "onclick" or "ondatachange"
- svy-api: object has to contains all the functions for the api which the server can call, like a requestFocus function.
There are a couple of special environment parameters/objects:
- svy-apply: contains a function to tell the server the dataprovider type properties have to be delegated to deeper/persistent model. When invoked the dataprovider value's are delegated from server component model to the record. To ease the component coding an shortcut can be used; when a component uses "ng-model" directive, the additional directive "svy-autoapply" can be used to prevent having the component logic calling to svy-apply function.
- svy-servoyApi: an object which provides Servoy environment functions to be used at client side logic, currently it contains "setFormVisibility(form,visible,[relation])"