EaxMdService.setEaxMd

Syntax

setEaxMd(report: PP.Exp.EaxDocument, callback: PP.Delegate);

Parameters

report. Express report document.

callback. Callback function used to get report metadata. This is an optional parameter, by default its value is not defined.

Description

The setEaxMd method sets metadata to express report object.

Example

Executing the example requires that the HTML page contains the HtmlExportDialog component named htmlExpDialog (see Example of Creating the HtmlExportDialog Component):

Replace contents of the showExpDialogOkClick function that handles clicking the OK button, with the following script:

function showExpDialogOkClick(sender, args, callback) {
    // Determine data to export
    var exportData = args.exportData || args || {};
    exportData.storeResult = True;
    exportData.palette = True;
    // Determine message body with data to export
    var body = {
        GetEaxMd: {
            tEax: eaxAnalyzer.getDocumentOdId ? eaxAnalyzer.getDocumentOdId() : eaxAnalyzer.getOdId(),
            tArg: {
                pattern: {
                    exportData: exportData
                }
            }
        }
    };
    // Set metadata to express report object
    eaxMdService.setEaxMd(eaxAnalyzer);
    // Determine callback function
    callback = eaxMdService._visitCallback(callback, new PP.Delegate(eaxMdService._onExportCompleted, eaxMdService, {
        Report: eaxAnalyzer
    }));
    // Send a message with express report data to export to the service
    eaxMdService._send(body, callback);
};

After executing the example clicking the OK button shows the dialog box for saving file that is exported to HTML.

See also:

EaxMdService