Browser value:
Here is a sample of what the value of a 'foundset' typed property contains in the browser - web component model:
Browser side provided property content in model
myFoundset: { serverSize: 44, // the size of the foundset on server (so not necessarily the total record count in case of large foundsets) // this is the data you need to have loaded on client (just request what you need via provided loadRecordsAsync or loadExtraRecordsAsync) viewPort: { startIndex: 15, size: 5, rows: [ { _svyRowId: 'someRowIdHASH1', nameColumn: "Bubu" }, { _svyRowId: 'someRowIdHASH2', nameColumn: "Yogy" }, { _svyRowId: 'someRowIdHASH3', nameColumn: "Ranger" }, { _svyRowId: 'someRowIdHASH4', nameColumn: "Watcher" }, { _svyRowId: 'someRowIdHASH5', nameColumn: "Hatcher" } ], // request a change of viewport bounds from the server; the requested data will be loaded asynchronously in 'viewPort' loadRecordsAsync: function(startIndex, size), // request more records for your viewPort; if the argument is positive more records will be loaded at the end of the 'viewPort', when negative more records will be loaded at the beginning of the 'viewPort' - asynchronously loadExtraRecordsAsync: function(negativeOrPositiveCount) }, selectedRowIndexes: [16], // can be out of viewPort as well multiSelect: false }
Design value (generated visually by form designer and written in .frm file, so Servoy users don't need to know about it)
Contents in .frm file
myFoundset: { foundsetSelector: "", dataProviders: ['nameColumn'] } }",
'foundsetSelector' can be:
- "" - use parent (form's) foundset;
- "myRelation" will give a related foundset;
- "datasource" would give a seoarate foundset for the given datasource
'dataProviders' specifies what are the data columns that need to be available in the browser - in the foundset property's 'viewPort' - in rows. For example you could have something like "dataProviders: ['nameColumn', 'age', 'imagem', 'imageurl']".
Runtime usage (server side Servoy JS)
[TODO] just make the ususal foundset obj. available in scripting
Overview
Content Tools
Activity