Online documentation - Websydian v6.0

Users Guide | Patterns Reference | WebsydianExpress | Search

 

WebUpdatePage Function

The WebUpdatePage pattern is a Page Generator prepared for handling updating of existing records in a database table.  The pattern specifies the fields of the UIBasic.Detail view in the WsyDetails variable and it contains an Update Event Handler function making it possible to change the non-key fields of the UIBasic.Detail view.

When inheriting directly from the WebUpdatePage pattern, it is necessary to replace the UIBasic.Update view by the application view on which the database update is done.  Further, it is necessary to replace the UIBasic.Detail view by the view containing the SingleFetch function called to get the existing values from the database

Before a row is updated in the database, validation is performed according to any validation rules specified in the AllFusion Plex model (e.g. by the FLD validated by FNC triple).  In case of failed validation, an Error Page function must be called.  This is done by testing on the local WsyBase<InstanceValid> field in the 0 call to build of document edit point.

Call Error Page from Update Event Handler

In case of failed validation, an Error Page function must be called from the Update Event Handler.