Websydian v6.1 online documentationOnline documentation - WebsydianExpress v3.5

Create a Grid on a Page

Overview

This section describes how you define a page, which is to contain a grid section and can be used in the WebsydianExpress framework.

Doing this will be part of creating a process. The steps needed for creating a process is described here. This section only describes the steps specific for the implementation of grid pages.

Define grid page function

The grid page function is defined using the following triples (as implement No is defined for the abstract functions you will have to set implement Yes for each function you wish to generate and build):

Source Object Verb Target Object
MyGridPage is a FNC WSYAPI/GridPageForProcess
MyGridPage implement SYS Yes
MyGridPage._DocumentTemplateGenerator implement SYS Yes

If you wish to have Next and Position events defined for the Grid - you must also inherit from the WSYAPI/WebGridPageForProcess function.

Replace fetch view and function

Replacing the Fetch view decides which fields is available for the grid, while replacing the BlockFetch function decides which records to show in the grid.

Source Object Verb Target Object
MyGridPage replaces VW

...by

UIBasic.Grid
MyEntity.MyFetchView
replaces FNC

...by

UIBasic.Grid.BlockFetch
MyEntity.MyFetchView.MyBlockFetch

Please note that the "replaces FNC" triple is only necessary if you do not use the standard BlockFetch functions scoped to MyEntity.MyFetchView.

Define Grid Length in template

WebsydianExpress offers support for a special replacement marker deciding the number of rows, which are shown in the grid.

Insert a /(ROWS-...) marker, where the ROWS- part of the marker is followed by a number specifying the number of rows you wish the grid to contain.

The /(ROWS-...) marker must be placed before the grid section.

As the replacement marker is not to be shown in the browser - the replacement marker should be placed in an HTML comment - (e.g.  <!--/(ROWS-10)--> - indicating a grid length of 10).

If you do not insert a /(ROWS-...) marker in the template the number of records shown will be found as it is in a standard Websydian grid page.