cancel
Showing results for 
Search instead for 
Did you mean: 

RoadMap onSelect does nor return the selected step

Former Member
0 Kudos

I'm using the roadmap to visualize the working steps in wizard like manner. Everything works fine.

I would like to make it possible to navigate by clicking the steps in the roadmap to reach previous steps faster.

The onSelect method is fired every time I click on a step. The documentation promises that there is a parameter called step which contains the currently selected step id. But the parameter list within the event parameter is empty. Where can I find the information about the selected step?

Or is the roadmap not intended for such a kind of usage?

Thanks in advance

Antje

I'm using SP12.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Add in the wdDoModifyView


if (firstTime)
{
  final IWDRoadMap rm = (IWDRoadMap)view.getElement("id-of-road-map");
  rm.mappingOfOnSelect().addSourceMapping("step", "name-of-param-in-action-handler");
}

VS

Former Member
0 Kudos

Thank you very much for your extremly fast answer, it solved my problem and I'm happy, so I think Valery and Armin are both winners

Antje

Answers (1)

Answers (1)

Former Member
0 Kudos

To get the selected step in an action handler you have to define a so-called parameter mapping between the UI element event parameter and the action handler parameter.

In wdDoModifyView() write the following code:


if (firstTime)
{
  IWDRoadMap roadmap = (IWDRoadMap)
    view.getElement("RoadMapID");
  roadmap.mappingOfOnSelect().addSourceMapping("step", "selectedStep");
}

In the action that handles the onSelect event, define a parameter "selectedStep" of type "string".

At runtime, the corresponding action handler parameter will contain the new selected RoadMap step ID.

Armin

(****, I lost the photo-finish with Valery

Message was edited by: Armin Reichert