JavaScript

{dialog.object}setStateInfo Method

IN THIS PAGE

Syntax

{Dialog.Object}.setStateInfo(obj)

Arguments

obj

A JSON object that specifies what data you want to store in the state object.

Description

Allows you to store arbitrary data in the UX Component's 'state' object.

Discussion 

The data in the 'state' object is submitted along with the data in the Dialog controls every time you submit the Dialog, or make an Ajax callback.

{dialog.object}.setStateInfo({myvar1: 'value for myvar1', myvar2: 'value for myvar2'});

Example 

You can also set a property in the state info object directly (bypassing the .setStateInfo() method)

{dialog.object}.stateInfo['myvar1'] = 'alpha';

See Also