cancel
Showing results for 
Search instead for 
Did you mean: 

Using MultipleRoadMapStep in Webdynpro Java

Former Member
0 Kudos

Hi guys,

I was trying to use the MultipleRoadMapStep element in a view, but I couldn't get it to work. The documentation states that the the dataSource property should be bound to a context element of type Object.

What I couldn't find was a description of how the structure of the context element has to be in order for the RoadMap step to react on it. The context I used was

+ RoadMap (bound to the dataSource of MultipleRoadMapStep)

+ + name (string)

but it didn't work. Did I use a wrong structure or do I have to add some coding to the view?

Any help is greatly appreciated.

Cheers,

Mark

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Type Object? Which documentation says this?

Use a context node with cardinality 0:N and bind the "dataSource" property of the MultipleRoadMapStep element to that node.

Add attributes like "Name", "Description" and "Type" and bind the properties of the MultipleRoadMapStep element to these attributes.

Armin

Former Member
0 Kudos

Hi Armin,

When having a look at the MultipleRoadMapStep API in the SAP Library the property "dataSource" is described as type Object.

<a href="http://help.sap.com/saphelp_erp2005/helpdata/en/15/0d4f21c17c8044af4868130e9fea07/frameset.htm">http://help.sap.com/saphelp_erp2005/helpdata/en/15/0d4f21c17c8044af4868130e9fea07/frameset.htm</a>

That was confusing me and I didn't know how to actually make it work. But I see what you mean now and I try it as soon as I get the chance.

Thanx a lot and have a good weekend!

Cheers,

Mark

Former Member
0 Kudos

Hi Armin,

The procedure with the binding of context attributes works fine for the MultipleRoadMapStep.

I now tried to add functionality to highlight the selected roadmap step and make the steps clickable for navigation. Therefore I added an handler to the <i>RoadMap.onSelect</i> event and did a mapping for the <i>IWDRoadMap.IWDOnSelect.STEP</i> parameter.

Up to here everything is fine, BUT the selectedStep parameter only contains the ID of the MultipleRoadMapStep component (which is always the same) and NOT the id of the actual (dynamically created) RoadMapStep.

Is there a way to find out what step was actually clicked even if it was created dynamically?

Cheers,

Mark

Former Member
0 Kudos

A MultipleRoadMapStep is rendered as multiple steps, one for each node element of its data source.

To find out the single step in the event handler, add an action parameter "selectedElement" of type IWDNodeElement (or the generated subinterface I<Node>Element).

Map the implicit event parameter "nodeElement" to "selectedElement" using the addSourceMapping() method (or using the parameter mapping editor in the view designer).

Programmatically:

wdDoModifyView():


if (firstTime)
{
  IWDRoadMap roadmap = (IWDRoadMap) view.getElement("ID-of-roadmap");
  roadmap.mappingOfOnSelect().addSourceMapping
  (
    "nodeElement", /* event parameter name */
    "selectedElement" /* action parameter name */
  );
}

Armin