Page History
...
The servoyApi is a Servoy specific api which can be used by web components for interacting to interact with the server. It must be declared in the private scope of the component.
Code Block | ||||
---|---|---|---|---|
| ||||
angular.module('mypackageComponent',['servoy']).directive('mypackageComponent', function() {
return {
restrict: 'E',
scope: {
model: "=svyModel",
svyServoyapi: "="
}, |
The servoyApi provides the following methods:
...
Method | Parameters | Description | |||||||
apply | propertyName –the name of the property of type dataprovider | Pushes a changed dataprovider value of the component to the server. It is used by the svy-autoapply directive, but it can also be used directly by the webcomponent. For example the radio button pushes the new value to the server when the radio is clicked:
| |||||||
callServerSideApi | methodName –the name of the serverside method to call args –the arguments of the serverside method | Used on the client side to call a function which is defined in the server side api of the component .
| |||||||
formWillShow | formname – the name of the form which will be shown relationname – the name of the relation (optional) formIndex – the formIndex in the tabpanel (optional) | Prepare the form for showing. Usage example tabpanel component when switching tabs:
| |||||||
hideForm | formname – the name of the form to hide relationname –the name of the relation (optional) formIndex –the formIndex in the tabpanel (optional) | Hides the form. Used by the tabpanel to hide the previously selected tab. | |||||||
getFormUrl | formName | Return the URL of a form. Example tabpanelIt can be used together with ng-include to include a form in the component template:
| |||||||
startEdit | propertyName –the name of the property which is edited | Signal that the editing of a property has started, usually at focus gained. |