Child pages
  • Specification (.spec file)

Versions Compared

Key

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

...

Code Block
languagejs
        "executeSomethingLater": 
        {
            "async": true
        }

Async-now service functions

These are currently supported only for ng services, not components. These are async functions that will be called in browser right away (rather then when the current request to server is done), but the code that calls then them does not wait for them to finish execution before proceeding.

They are useful when for example you want to send progress information to the component shown in the browser service client-side while executing a long-running-operation server-side.

...

Code Block
languagejs
        "sendProgress": 
        {
            "async-now": true,
            "parameters": [ { "name": "percent", "type": "int" } ]
        }

Delay-until-form-loads component functions
Anchor
delayUntilFormLoads
delayUntilFormLoads

These are special types of async calls meant only for components, not services. These functions, when called, will execute later (similar to simple async, when a request to server is done executing) but only if the form is loaded inside the browser.

...

Calls to async functions with the same name and marked as "discardPreviouslyQueuedSimilarCalls" that come in before previously queued such calls are really sent to the browser window will discard those previous calls completely (and keep only the latest).

So for example a requestFocus() function call you would only need to send once - after an event from client was processedhandler finished execution server-side. You can send that later and only for the last requestFocus() that executed. If you click on a button for example and the solution has very complex code executing there that ends up calling requestFocus() 100 times on various components from various forms, you actually only want the last requestFocus to execute after the button is clicked. Otherwise there would be a huge performance penalty. That is why all requestFocus calls from existing components are (or should be) marked as "discardPreviouslyQueuedSimilarCalls".

...