Child pages
  • Specification (.spec file)

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
"functionName" : {
        "returns" : "string",
        "parameters" : [
            { "name" : "start", "type" : "int" },
            { "name" : "end", "type" : "int" } 
        ],
        "blockEventProcessing": true,
		"async": true
}

"blockEventProcessing" is optional and not needed in almost all cases. It defaults to true. When it is set to false, Servoy will expect that this API call will be long-running (so it will not time out) and at the same time it will allow other events to be handled by the event dispatcher while waiting for the return value. This is helpful for example if a component would have an API call like "askForSomeValue(customForm)" which shows a modal dialog containing a form and returns a value. That API call has to wait for the return value an indefinite amount of time without blocking other events from being dispatched.

"async" is another optional parameter (default is false), which means the client side api is not called right away, but at next message sent to the client. By default all apis are sync, so they call the client and wait for the response. Async methods cannot return a value.

Data synchronization
Anchor
pushToServer
pushToServer

...