This demonstrates use of view.dialog() function.

view.dialog {parameters:...} object allows to pass arbitrary data and functions to the dialog.

Dialog scripts can access passed parameters through view.parameters property.