Page History
...
For performance reasons, data modifications from client to server are not propagated by default. To enable this configure twoWay pustToServer setting on the property.
twoWay pushToServer value | description | ||
---|---|---|---|
not set | reject | this is the default, no data synchronisation from client to server for this propertydeep | |
allow | watch model changes based on object equality (compares old and new values of structured/nested objects, less performant) | shallow | watch model changesdata changes from client to server are allowed |
shallow | same as allow, sablo will add a watch on the model in the client and send changes to the client; the watch is based on object reference/primitive value (more performant, but in case of structured/nested objects it will only trigger data synchronisation when the objects are different by reference, even if they are actually 'equal' by content) | ||
deep | same as allow, sablo will add a watch on the model in the client and send changes to the client; the watch is based on object equality (compares old and new values of structured/nested objects, less performant) |
For example:
Code Block | ||||
---|---|---|---|---|
| ||||
"model": { "searchfield" : { "type": "string", "twoWaypushToServer": "shallow" } } } |
Note that in Servoy, data-provider properties are synchronised using svy-apply svy-autoapply, for these properties twoWay is not neededpushToServer should be set to allow.
Tags
Properties can be configured with special tags that may be interpreted by the deployment environment.
...
Code Block | ||||
---|---|---|---|---|
| ||||
{ "name": "servoydefault-tabpanel", "displayName": "Tab Panel", "version": 1, "icon": "servoydefault/tabpanel/tabs.gif", "definition": "servoydefault/tabpanel/tabpanel.js", "serverscript": "servoydefault/tabpanel/tabpanel_server.js", "libraries": [{"name":"accordionpanel", "version":"1", "url":"servoydefault/tabpanel/accordionpanel.css", "mimetype":"text/css"}], "model": { "background" : "color", "borderType" : {"type":"border","stringformat":true}, "enabled" : { "type": "protected", "blockingOn": false, "default": true }, "fontType" : {"type":"font","stringformat":true}, "foreground" : "color", "horizontalAlignment" : {"type" :"int", "tags": { "scope" :"design" }, "values" :[{"LEFT":2}, {"CENTER":0},{"RIGHT":4}],"default" : -1}, "location" : "point", "readOnly" : "protected", "selectedTabColor" : "color", "size" : {"type" :"dimension", "default" : {"width":300, "height":300}}, "styleClass" : { "type" :"styleclass", "tags": { "scope" :"design" }, "values" :[]}, "tabIndex" : { "type": "object", "twoWaypushToserver": "shallow" }, "tabOrientation" : {"type" :"int", "tags": { "scope" :"design" }, "values" :[{"default" :0}, {"TOP":1}, {"HIDE":-1}]}, "tabSeq" : {"type" :"tabseq", "tags": { "scope" :"design" }}, "tabs" : {"type":"tab[]", "droppable":true}, "transparent" : "boolean", "visible" : "visible" }, "handlers": { "onChangeMethodID" : "function", "onTabChangeMethodID" : "function" }, "api": { "addTab": { "returns": "boolean", "parameters":[ { "name":"form/formname", "type":"object []" }, { "name":"name", "type":"object", "optional":true }, { "name":"tabText", "type":"object", "optional":true }, { "name":"tooltip", "type":"object", "optional":true }, { "name":"iconURL", "type":"object", "optional":true }, { "name":"fg", "type":"object", "optional":true }, { "name":"bg", "type":"object", "optional":true }, { "name":"relatedfoundset/relationname", "type":"object", "optional":true }, { "name":"index", "type":"object", "optional":true } ] }, "getMaxTabIndex": { "returns": "int" }, "getMnemonicAt": { "returns": "string", "parameters":[ { "name":"i", "type":"int" } ] }, "getSelectedTabFormName": { "returns": "string" }, "getTabBGColorAt": { "returns": "string", "parameters":[ { "name":"unnamed_0", "type":"int" } ] }, "getTabFGColorAt": { "returns": "string", "parameters":[ { "name":"i", "type":"int" } ] }, "getTabFormNameAt": { "returns": "string", "parameters":[ { "name":"i", "type":"int" } ] }, "getTabNameAt": { "returns": "string", "parameters":[ { "name":"i", "type":"int" } ] }, "getTabRelationNameAt": { "returns": "string", "parameters":[ { "name":"i", "type":"int" } ] }, "getTabTextAt": { "returns": "string", "parameters":[ { "name":"i", "type":"int" } ] }, "isTabEnabled": { "returns": "boolean", "parameters":[ { "name":"unnamed_0", "type":"int" } ] }, "isTabEnabledAt": { "returns": "boolean", "parameters":[ { "name":"i", "type":"int" } ] }, "removeAllTabs": { "returns": "boolean" }, "removeTabAt": { "returns": "boolean", "parameters":[ { "name":"index", "type":"int" } ] }, "setMnemonicAt": { "parameters":[ { "name":"index", "type":"int" }, { "name":"text", "type":"string" } ] }, "setTabBGColorAt": { "parameters":[ { "name":"unnamed_0", "type":"int" }, { "name":"unnamed_1", "type":"string" } ] }, "setTabEnabled": { "parameters":[ { "name":"unnamed_0", "type":"int" }, { "name":"unnamed_1", "type":"boolean" } ] }, "setTabEnabledAt": { "parameters":[ { "name":"i", "type":"int" }, { "name":"b", "type":"boolean" } ] }, "setTabFGColorAt": { "parameters":[ { "name":"i", "type":"int" }, { "name":"s", "type":"string" } ] }, "setTabTextAt": { "parameters":[ { "name":"index", "type":"int" }, { "name":"text", "type":"string" } ] } }, "types": { "tab": { "name": "string", "containsFormId": "form", "text": "tagstring", "relationName": "relation", "active": "boolean", "foreground": "color", "disabled": "boolean", "imageMediaID": "media", "mnemonic": "string" } } } |
...