Child pages
  • Foundset property type

Versions Compared

Key

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

...

Purpose of this property type

Info

foundsetTypeConstantsThis This page is written mostly for NG web component creators, not for Servoy developers that just want to use web components. You might want to view general Servoy Foundset documentation instead.

...

This was added in order to improve performance by removing the need for angular watches. You no longer need to add lots of angular watches, deep or collection watches in order to be aware of incoming server changes to the foundset property. Each such watch would slow down the page - as watches are triggered a lot for all kinds of user actions or socket traffic. Also the listener can give more detailed information in order to do more granular updates to the UI easier.

Look at this change listener from the client side foundset property's point of view, not from the server's point of view. For example a NOTIFY_FULL_VALUE_CHANGED does not necessarily mean that the server side foundset has changed by reference. It actually means that all client side contents of the foundset property did change - or might have changed. So it is meant to notify about changes in client side property value.

To add an incoming server change listener to this property type just call:

...

Code Block
languagejs
titleBrowser side provided property content in model
myFoundset: {
    (...)
    viewPort: {
        startIndex: 15,
        size: 2,
        rows: [ { _svyRowId: 'someRowIdHASH1', dp1dp0: (...), dp2dp1: (...), dp3dp2: (...) },
                { _svyRowId: 'someRowIdHASH2', dp1dp0: (...), dp2dp1: (...), dp3dp2: (...) } ],
        (...)
    },
    (...)
}

Notice the fixed column names: dp0, dp1, dp2, ... dp[N-1] where N is the number of foundset dataproviders that the developer has chosen.

...