RenderingIncrement

Causes occurrences retrieved from the server to be incrementally rendered in a dynamic server page using the specified batch sizes.

RenderingIncrement=firstBatchSize{, subsequentBatchSize}

Example: $entityproperties(ENT.MODEL) = "RenderingIncrement=50,10"

Value Description
firstBatchSize Number of occurrences to be rendered in the first batch of retrieved occurrences. If subsequentBatchSize is not specified, the size is used for all batches.

If set to 0 or an empty string (""), incremental rendering is disabled.

subsequentBatchSize Number of occurrences to be rendered in subsequent batches of retrieved occurrences. Optional.

Usage

Dynamic? Yes
Supported in Grid? No
Dependencies: No

Description

When a Dynamic Server Page needs to load a large number of occurrences retrieved from the server, the data can take some time to render.

You can use the RenderingIncrement property to incrementally render the data, providing a faster and more responsive user experience. For example, if there are 1000 occurrences retrieved for an entity, you can specify that 100 occurrences be rendered immediately so the user can examine and interact with the data, for example by clicking a field. By specifying a smaller subsequentBatchSize such as 25, the browser is able to process mouse and keyboard events from the user, providing a faster response for the user.

This property can be set in the HTML layout, in ProcScript, or in JavaScript.

Setting in the Layout

To set this property in the layout, add the attribute data-uniface-renderingincrement to the HTML element that is bound to the entity. For example:

<div id="uent:MYENT.MYMODEL" data-uniface-renderingincrement="50,15"> ... </div>

Using in ProcScript

To set this property in ProcScript, you can use $entityproperties before the first webdefinitions invocation, or $CurEntProperties at any time. For more information, see webdefinitions, $entityproperties and $CurEntProperties.

For example, if AUTHOR is an outer entity and BOOK is an inner entity, the following statements will render the first 50 occurrences of AUTHOR and render occurrences of BOOK in batches of 25 (or less), within each AUTHOR entity. If there are more than 50 occurrences of AUTHOR, occurrences after occurrence number 50 are rendered in batches of 25.

$entityproperties(AUTHOR.BOOKS) = "RenderingIncrement=50,25"
$curEntProperties(BOOK.BOOKS) = "RenderingIncrement=25"

To get the current value of this property for entity AUTHOR:

vProps = $entityproperties(AUTHOR.BOOKS, "RenderingIncrement")

Using in JavaScript

It is possible to set this property in JavaScript using the JavaScript API entity.setProperty. For example:

uniface.getInstance().getEntity("AUTHOR.BOOKS").setProperty("uniface:renderingincrement", "60,5");

Applies To