Creatio development guide
PDF
bpm’online development guide
This documentation is valid for Creatio version 7.12.0. We recommend using the newest version of Creatio documentation.

Client view model schemas

Glossary Item Box

Introduction

A custom view model schema is a visual module schema that implements client part of the application. Custom view model schema is a kind of configuration object for generating views and view models by the ViewGenerator and ViewModelGenerator generators of bmp’online. Custom module types are described in the "Client Modules” article.

Source code structure of custom schema

All schemas have a common structure. Schema source code example:

define("ExampleSchema", [], function() {
    return {
        entitySchemaName: "ExampleEntity",
        mixins: {},
        attributes: {},
        messages: {},
        methods: {},
        rules: {},
        businessRules: /**SCHEMA_BUSINESS_RULES*/{}/**SCHEMA_BUSINESS_RULES*/,
        modules: /**SCHEMA_MODULES*/{}/**SCHEMA_MODULES*/,
        diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/
    };
});

A Schema configuration object is returned by anonymous factory function that is called after loading the module. The object can have following properties:

entitySchemaName – object (model) schema name that will be used by this client schema.

mixins – configuration object that contains mixin declaration. More information about the mixins you can find in the "Mixins. The "mixins" property” article.

attributes – configuration object that contains schema attributes. More information about the attributes you can find in the "Attributes. The "attributes" property” article.

messages – configuration object that contains schema messages. More information you can find in the "Messages. The "messages" property” article.

methods – configuration object that contains schema methods. More information about this property you can find in the "Methods. The "methods" property” article.

rules – configuration object that contains schema business rules. More information about this property you can find in the "Rules. The "rules" property” article.

businessRules — configuration object that contains schema business rules, which are created or edited via the section wizard or detail wizard. Marker comments  /**SCHEMA_BUSINESS_RULES*/ are used by the wizards and therefore are required. More information about this property you can find in the "Business rules. The businessRules property" article.

modules – configuration object that contains schema modules. Marker comments / ** SCHEMA_MODULES * / are used by the wizards and therefore are required. More information about this property you can find in the "Modules. The "modules" property” article.

NOTE

To load a detail on a page the details property is used. But the detail is a module and it is appropriate to use the modules property.

diff – configuration object array that contains schema view description. Marker comments / ** SCHEMA_DIFF * / are used by the wizards and therefore are required. For more information about the diff array configuration, please refer to the "The "diff" array" article.

properties — configuration object which contains the view model properties. Detailed information about this property is available in the "Properties. The "properties" property" article.

$-properties — automatically generated properties for the view model attributes.  More information can be found in the "Automatically generated view model properties" article.

© bpm'online 2002-2019.

Did you find this information useful?

How can we improve it?