beginBatch(bIgnoreError: Boolean);
bIgnoreError. Indicates if batch queries are processed independently. Available values:
true. Batch queries are processed independently.
false. Batch queries are not processed independently.
The beginBatch method enables batch mode of sending queries.
Batch mode of sending queries is disabled by the DimSrv.endBatch method.
To execute the example, the HTML page must contain the DimTree component named dimTree that uses the dim dictionary as its source (see Example of Creating the DimTree Component). Create a service used to work with dictionaries, and check if batch mode of sending queries is enabled, and if it is disabled, enable it:
// Create a service used to work with dictionaries var dimService = new PP.Mb.DimSrv({ Metabase: mb }); // Check if batch mode of sending queries is enabled if (dimService.getIsBatchMode()) { console.log("Batch mode of sending queries is enabled"); } else { console.log("Batch mode of sending queries is disabled"); dimService.beginBatch(); }
The console displays a message about checking if batch mode of sending queries is enabled:
Batch mode of sending queries is enabled
Open elements with the 1990 and 1994 contents. The elements are expanded but are empty:
Disable batch mode of sending queries:
// Disable batch mode of sending queries dimService.endBatch(False);
After disabling batch mode of sending queries a query is sent to the server and the contents of expanded elements is loaded:
See also: