VisualForce Events for Customizing the Wizard UI

This reference section explains the details of using VisualForce for customizing the Wizard user interface.

Event NameSubscribe/PublishDescriptionResponse
readypublishFired from client indicating they are ready to receive events.Response contains all the metadata: page, variableDefinitions, initialValues needed to render the questions and possible answers for the page.
updatepublishFired from client when ready to update one or more variables.Variables with errors messages.
visibilitypublishFired from client to check ‘visibility’ of one or more questions.Variables and their visibility enum.
valuespublishFired from client to request the most up-to-date values of each question.The values of all variables in the entire wizard.
nextsubscribeFired from parent when user clicks “continue” button. May or may not advance the page. If there are errors in the variable values, the page will not advance.A list of variables that are required with no values.
resizepublishFired from client to change the size of the VisualForce page.None.
optionspublishFired from client to get a list of ‘options’ for filling in drop-down list boxes.List will be filtered for “queryable,” “excludes,” “exclude selected.” “Tags” will be applied to indicate which option values are “default,” “recommended,” or “previous” values. You can use this for sObjects, sObjectFields, string enums, and number enums.
computedpublishFired from client to set the computed (suggested) values for a variable.Variables with success or error messages.
closepublishFired from client to close the wizard. No actions are taken as part of the close.None.
buttonspublishChange the text of the Back and Next button. Can also enable or disable the Back or Next button. 
createpublishFired from the client to create an app before the final screen. Calls POST /wave/folder and returns results.The status of the POST call. Success if app creation is kicked off successfully (not final app status), otherwise Fail.
datasetCOMING SOONDatasetComing soon; not currently supported in this release. We intend to implement this as an ‘options’ event.
dataset fieldsCOMING SOONDimensions, Measures tied to parent datasetsComing soon; not currently supported in this release. We intend to implement this as an ‘options’ event.

Event: wizard.ready 

  • Subscribe/Publish: publish

  • Input/Multiple: optional

    • Size: small, medium, large

    • Banner: visible, title, progress

      Note: for VisualForce pages, the banner is hidden by default.

  • Response: Yes

  • Normalized Input: N/A

  • Input Examples:

    • {}
    • {size : “large” }
    • {banner : visible : true, title : “My Custom title”, progress : “Almost done”}}
    • {size : “small”, banner : {visible : false}}
  • Output Example:

    1{
    2  "page": {
    3    "condition": null,
    4    "helpUrl": null,
    5    "title": "Page 1",
    6    "variables": [
    7      {
    8        "name": "stringExample",
    9        "visibility": "Visible"
    10      },
    11      {
    12        "name": "visibilityControl"
    13        "visibility": "Visible"
    14      },
    15      {
    16        "name": "visibilityTest",
    17        "visibility": "Hidden"
    18      }
    19    ]
    20  },
    21  "variableDefinitions": {
    22    "stringExample": {
    23      "label": "What is the value of the string?",
    24      "description": "The String.",
    25      "defaultValue": null,
    26      "variableType": {
    27        "type": "StringType",
    28        "enums": [
    29          "foo",
    30          "bar",
    31          "baz",
    32          "testStr"
    33        ]
    34      }
    35    },
    36    "stringExample2": {
    37      "label": "What is the value of this string?",
    38      "description": "The String2.",
    39      "defaultValue": null,
    40      "variableType": {
    41        "type": "StringType"
    42      }
    43    },
    44    "visibilityControl": {
    45      "label": "Do you want to answer more questions?",
    46      "description": "Check to test visibility",
    47      "variableType": {
    48        "type": "BooleanType"
    49      },
    50      "defaultValue": false,
    51      "required": true
    52    },
    53    "visibilityTest": {
    54      "label": "I should only be visible when visibilityControl is checked",
    55      "variableType": {
    56        "type": "StringType",
    57        "enums": [
    58          "aaa",
    59          "bbb",
    60          "ccc"
    61        ]
    62      }
    63    },
    64    "visibilityTest2": {
    65      "label": "I should only be enabled when visibilityControl is checked",
    66      "variableType": {
    67        "type": "StringType"
    68      }
    69    },
    70    "datasetExample": {
    71      "label": "Pick a dataset",
    72      "description": "Interesting dataset",
    73      "variableType": {
    74        "type": "DatasetType"
    75      }
    76    },
    77    "dimensionExample": {
    78      "label": "Pick a dimension",
    79      "description": "Dim testing",
    80      "defaultValue": {
    81        "datasetId": "{{Variables.datasetExample.datasetId}}",
    82        "fieldName": "test"
    83      },
    84      "variableType": {
    85        "type": "DatasetDimensionType"
    86      },
    87      "required": false
    88    }
    89  },
    90  "initialValues": {
    91    "stringExample": null,
    92    "stringExample2": null,
    93    "visibilityControl": false,
    94    "dimensionExample": {
    95      "datasetId": "{{Variables.datasetExample.datasetId}}",
    96      "fieldName": "test"
    97    }
    98  }
    99}

Event: wizard.update 

  • Subscribe/Publish: publish

  • Input/Multiple: yes

  • Response: yes

  • Normalized Input: yes

  • Input Examples:

    • {name : “myVariable”, value : “some value” }
    • [{name : “myVariable”, value : “some value” }]
    • [{name : “myVariable”, value : “some value” }, {name : “myNumber”, value : 123}]
    • {myVariable : “some value”, myNumber: 123, myBoolean : true}
    • {name : “mySObject”, value : {sobjectName : “Account”}}
  • Output Example: always an array

    1[
    2    {name : “myVariable”: value : “some value”, valid : true },
    3    {name : “myNumber”: value : null, valid : false, errorMessage : “Not a valid value”}
    4    {name : “mySObject”: value : {sobjectName : “Account”}, valid : true}
    5]

Event: wizard.visibility 

  • Subscribe/Publish: publish

  • Input/Multiple: yes

  • Response: yes

  • Normalized Input: yes

  • Input Examples:

    • [“myVariable”, “myNumber”]
    • [{name : “myVariable”}]
    • {name : “myVariable”}
    • “myVariable”
  • Output Example: always an array

    1[
    
    2  {name : “myVariable”: visibility : “Hidden”},
    
    3  {name : “myNumber”: visibility : “Visible”},
    
    4  {name : “myOtherVariable”: visibility : “Disabled”}

    5]

Event: wizard.values 

  • Subscribe/Publish: publish

  • Input/Multiple: n/a

  • Response: yes

  • Normalized Input: n/a

  • Input Examples:

    • {}
  • Output Example:

    1{  
    2    values : {
    3        myVariable: “foo”,
    4        myNumber: 123,
    5        myBoolean: true,
    6        myDimension: {fieldName : “days”}
    7   }
    8}

Event: wizard.next 

  • Subscribe/Publish: subscribe

  • Input/Multiple: n/a

  • Response: yes

  • Normalized Input: n/a

  • Output Example: Page will not advance if required fields are not met.

    • 1{
      2        “myVariable”: {
      3              errorMessage: “Not a valid value”,
      4              isRequired : true,
      5              variableName : “myVariable”
      6        }
      7}
    • 1{}

Event: wizard.resize 

  • Subscribe/Publish: publish

  • Input/Multiple: n/a

  • Response: no

  • Normalized Input: n/a

  • Input Examples:

    • {size : “small”}
    • {size : “medium”}
    • {size : “large”}

Event: wizard.options 

  • Subscribe/Publish: publish

  • Input/Multiple: no

  • Response: yes

  • Normalized Input: n/a

  • Input Examples:

    • {name : “mySObjectVariableName”}
    • {name : “mySObjectFieldVariableName”}
    • {name : “myStringVariableName”}
    • {name : “myNumbertVariableName”}
  • Output Example:

    1{
    2 "options": [
    3   {
    4     "label": "Account",
    5     "value": "Account",
    6     "tags": [
    7       {
    8         "tag": "Default",
    9         "toolTip": "Default answer"
    10       }
    11     ]
    12   },
    13   {
    14     "label": "Oppty",
    15     "value": "Opportunities"
    16   }
    17 ]
    18}

Event: wizard.buttons 

  • Subscribe/Publish: publish

  • Input/Multiple: n/a

  • Response: no

  • Normalized Input: n/a

  • Input Examples:

    • 1{buttons : {
      2    next : {disabled : true, text : “Fix error before continue”},
      3    back : {disabled : false, text : “Go Back”}
      4  }
      5}
    • 1{  buttons : {
      2    back : {disabled : true}
      3  }
      4}
    • 1{  buttons : {
      2    next: {“text” : “Proceed at Own Risk”}
      3  }
      4}
  • Output Example:

    None. Buttons should update accordingly.

Event: wizard.create 

  • Subscribe/Publish: publish

  • Input/Multiple: no

  • Response: yes

  • Normalized Input: yes

  • Input Examples:

    • 1{folder : {label : "vfTest", description : "my desc"}}