ParamView Constructor

Syntax

PP.Mb.Ui.ParamView (setiings)

Parameters

setiings. JSON object that contains values of class properties.

Description

The ParamView constructor creates an instance of the ParamView class.

Example

To execute the example, in the HEAD tag of the HTML page add links to the following JS and CSS files:

The repository must contain an express report with the key 312. Parameter with the IDTEXTPAR1 must be set for data source of express report.

In the SCRIPT tag add the following script:

        var eaxAnalyzer, eaxMbService;
        PP.resourceManager.setRootResourcesFolder("../resources/");
        PP.setCurrentCulture(PP.Cultures.ru);
        PP.ImagePath = "../build/img";
        PP.ScriptPath = "../build/";
        PP.CSSPath = "../build/";
        function onReady() {
            //Create a repository instance
            metabase = new PP.Mb.Metabase({
                PPServiceUrl: "PPService.axd?action=proxy",
                Id: "p5lopatina",
                UserCreds: { UserName: "p5lopatina", Password: "p5lopatina" }
            });
            //Open repository
            metabase.open();
            //Create a service used to work with express reports
            eaxMbService = new PP.Exp.EaxMdService({ Metabase: metabase });
            //open express report for edit
            eaxAnalyzer = eaxMbService.edit(312, onEaxReady);
       }
        function onEaxReady() {
            //create a control for express report parameter
            param = new PP.Mb.Ui.ParamView({
                Metabase: metabase,
                Source: eaxAnalyzer.getParamById("TEXTPAR1"),
                ParentNode: document.body,
                Width: 200
            });
        };

In the onready attribute of the BODY tag specify name of the function to be executed on page loading:

<body onload="onReady()">

</body>

After executing the example a control for express report parameter is placed in the page This control may look as follows:

See also:

ParamView