cancel
Showing results for 
Search instead for 
Did you mean: 

RoadMap doesn't return the selectedStep

Former Member
0 Kudos

Hi,

I implemented a View with RoadMap element. Then I created selectedStepId attribute (string type) in a View context and bind it with RoadMap's selectedStep property. After that I assigned an action "StepSelected" to the RoadMap.onSelect event.

In the action handler I wrote:

public void onActionStepSelected(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
  {
    //@@begin onActionStepSelected(ServerEvent)
	String stepId = wdContext.currentContextElement().getSelectedStepId();
	String stepIdFromEvent = wdEvent.getString("step");
	...
    //@@end
  }

But stepId and stepIdFromEvent always = null when this action works.

Any thoughts, friends?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Add this code to the <i>wdDoModifyView()</i> method:

IWDRoadMap rdMap = (IWDRoadMap) view.getElement("<id of the RoadMap UI>");
    	
rdMap.mappingOfOnSelect().addSourceMapping("step","selectedStep");

Edit the StepSelected action to add a parameter called "<i>selectedStep</i>" of type String. After this the signature for the action handler will look like:

public void onActionStepSelected(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, String selectedStep )

Inside the action handler you can access the selected step simply as "<i>selectedStep</i>".

Regards,

Satyajit.

Answers (1)

Answers (1)

Former Member
0 Kudos

Great. It works by this way. Thanks!

But why this stuff doesn't work by a standard way, described in my thirst post?