cancel
Showing results for 
Search instead for 
Did you mean: 

Road map selected color

Former Member
0 Kudos

Hi All,

Onload of the screen, my roadmap UI shows the first step in Orange color when its selected. But after that if i select any other step the orange color does not show. Should i set it anywhere?

Regards

Suresh

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Ajay,

I have already done all that you have mentioned here. Infact the Roadmap works perfect in all other ways. But the color is still not coming up.

Whats the specific step which makes the selected color orange? Or is it a inbuilt property?

Iam asking this because could it be a bug!

I tried the phase indicator and have no issues with that. But want to use a Road map here.

Regards,

Suresh

Former Member
0 Kudos

Suresh,

The 'selectedStep' property of the RoadMap should take care of the orange color. What you need to look at is how to change the selectedStep value. The onSelect event of the RoadMap has a parameter 'step' which gives you the current step you select. The RoadMap UI element needs to know the selected step and it will paint that in orange. Hence you should add the parameter of the type String say 'step' (or any other name) to your action assigned to the onSelect event of RoadMap. You should map this parameter and the 'step' parameter of the onSelect event. Thus you'l have the id of the 'current'(i.e. selected step) step in the parameter of the action. Then use that parameter and set its value in the context attribute and bind that context attribute to the selectedStep property of the roadmap. I described these steps in my previous post. They should work fine. Just check if you have done all the things mentioned correctly. If you still don't get the selected step higlighted, then I'd say it may be a bug.

Regards,

Ajay

Former Member
0 Kudos

Hi Suresh,

In order to make the selected steps ornage in color, do the following:

1.Create a context attribute of the thype String say SelectedStep

2.Bind this Attribute to the selectedStep property of your RoadMap UI element

3.Assign an action say 'Select' to the onSelect event of the RoadMap UI element

4. Add a parameter say 'step' to this 'Select' action

5. Add the following line in 'Select' action:

wdContext.currentContextElement().setSelectedStep(step);

6. Right click your RoadMap UI Element (in the 'Outline view, do not right click it in the Layout tab of the view designer) and select 'Parameter Mapping'.

Map the Parameter 'step' from the 'Select' action to the parameter 'step' of the onSelect event. (from Right to left)

If you do not have the 'Parameter Mapping' option on the right click, then add the following code in your wdModifyView Method:

IWDRoadMap rdmp = (IWDRoadMap)view.getElement("< id of your RoadMap ui element");
 rdmp.mappingOfOnSelect().addSourceMapping("step","step");

This code does the mapping between parameter 'step' of the action 'Select' and the parameter 'step' of the 'onSelect' events programatically.

Save, DC-.Build and Deploy.

Whichever step you click, will be orange in color.

Also note that in the 'select' action, you can use the 'step' parameter to get the selected step and add your logic based on that

e.g.

public void onActionSelect(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, java.lang.String step )
  {
    //@@begin onActionSelect1(ServerEvent)
        //Set the selected Step
        wdContext.currentContextElement().setSelectedStep(step);

       if(step.equals("<id of step 1>")
      {
        //logic here
       }
     else
    {
      //logic here
    }

    //@@end
  }

Regards,

Ajay

former_member214651
Active Contributor
0 Kudos

Hi,

If you have multiple pages with the same Roadmap steps in every page you can set the selectedStep property for the corresponding page road map step at design time.

If u have a single page and if u want the roadmap step to change the color of the selectedStep step based on some action, then bind the property "selectedStep" to a context attribute of type WDRoadMapStepDesign

Using the options of WDRoadMapStepDesign, the color of step changes automatically

Regards,

Poojith MV