Online documentation - Websydian v6.0

Users Guide | Patterns Reference | WebsydianExpress | Search

 
» Related Information

Handling Displayed As Fields

Wsyval - Implementing


PageGeneratorWithFieldConversion

The PageGeneratorWithFieldConversion pattern performs the conversion from the internal representation of field values (the field values stored in the database) to the external representation of fields (the field value seen by the user).  If a FLD displayed as FLD triple is specified for a field, the associated conversion function specified by the ...output FNC continuation triple will be called.

The pattern also calls functions denoted by the FLD computed by FNC triple to initialize field values.

Page Generator functions cannot be implemented from the PageGeneratorWithFieldConversion pattern alone.  A PageGenerator pattern must also be included in the inheritance path.

EventHandlerWithFieldConversion

The EventHandlerWithFieldConversion pattern performs the conversion from the external representation of the WebInput fields (the field values as seen by the user) to the internal representation (the values stored in the database).  If a FLD displayed as FLD triple is specified for a field, the associated conversion function specified by the ...input FNC continuation triple is called.

When the EventHandlerWithFieldConversion pattern is used, remember to add the target field of the FLD displayed as FLD triple to the WebInput variable.

The pattern also calls functions denoted by the FLD computed by FNC triple to initialize field values.

EventHandlerWithValidation

The EventHandlerWithValidation pattern calls validation functions specified in the AllFusion Plex model.  In this way, the Event Handler functions in Websydian will validate input in the same way as the maintenance functions in the EditDialog.EditSuite library pattern .

EventHandlerWithValidation with validation uses the library function patterns Meta.ValidateFields, Meta.ValidateFieldRelations, Meta.ValidateView, and Meta.ValidateEntityRelations functions which will call functions specified by the FLD validated by FNC, REL validated by FNC, VW validated by FNC, and ENT checked by FNC triples.  The validation functionality will also check for mandatory fields and relations.

If errors are found, the WsyBase<InstanceValid> field is set to *No and the errors found are reported by calling the subroutine Send message which further calls the service function InsertErrorMessageInList.  It is now up to the developer to react on the WsyBase<InstanceValid> field and the non-empty Message List.  This functionality is implemented in the Insert and Update Event Handler functions scoped by the WebEditDialog pattern in the Utility module.

If all of the validations mentioned above should be performed, the fields in the WebInput variable must also be specified by a FNC local VW triple.  If the fields are only specified by FNC local FLD triples, only the field validation will be performed.  To enable the relation validations, it is also necessary to specify the contents of the TargetRelations variable.