cancel
Showing results for 
Search instead for 
Did you mean: 

How to place Form in the steps of RoadMap UI Element

former_member205363
Contributor
0 Kudos

Hi Friends,

I have taken RoadMap UI Element in WebDynpro java, added 3 steps and I am able to give name of each step and description, if I click the step how to provide different forms in each step.

Please help me how to do that.

Regards,

Lakshmi Prasad.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Go through the below link: Same issue:

As Armin said in the above thread assign an action "StepSelected" to the RoadMap.onSelect event. Bind the RoadMap.selectedStep property to a context attribute "SelectedStepId" of type "string".

In the action handler, you can now read the (new) selected step from the context and navigate to the target view:

void onStepSelected(...)
{
  final String stepId = wdContext.currentContextElement().getSelectedStepId();
  if ("<ID-of-step0>".equals(stepId))
  {
    wdThis.wdFirePlugTo<target-view-for-step0>;
  }
  else if (...)
  {
  }
}

And also:

Regards,

Charan

Former Member
0 Kudos

Hi,

There is another approach.

Create seperate view as RoadMapView

and dirrerent views for Step1View, Step2View, ..etc

Create a window and take the Grid layout(1 column, 2 rows) :

And in the top row embed RoadMapView and make that default as true.

And in the bottom row embed all the step views and make Step1View as default.

And use the above mentioned code to change the StepViews in the RoadMapUIElements step selection action of RoadMapView.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi lakshmi,

Check out this wiki..

https://www.sdn.sap.com/irj/scn/wiki?path=/display/wdjava/webdynproJava-UI-Development-Roadmap+Element.

Regards,

Saleem

Former Member
0 Kudos

Hi lakshmi,

Create view containet UI element in the main view (view which contains RoadMap UI element).

Embed 3 views in the container one for each step, and create forms in the views.Create navigation plugs from main view to all the views.

add this code in wdDoModifyView:-

public static void wdDoModifyView(IPrivateRoadAppView wdThis, IPrivateRoadAppView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)

{

//@@begin wdDoModifyView

IWDRoadMap myroadmap = (IWDRoadMap)view.getElement("RoadMap");

myroadmap.mappingOfOnSelect().addSourceMapping(IWDRoadMap.IWDOnSelect.STEP,"step");

//@@end

}

Here "step" should be the argument for the Roadmap action method.

create onSelect action for Roadmap and pass the String arg. "step" to the method.

add the code in the Action method.

public void onActionselect(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, java.lang.String step )

{

//@@begin onActionselect(ServerEvent)

if(step.equalsIgnoreCase("RoadMapStep"))

{

//write ur logic here as per the requirement

wdThis.wdFirePlug<name>;

}

if(step.equalsIgnoreCase("RoadMapStep1"))

{

//write ur logic here as per the requirement

wdThis.wdFirePlug<name>;

}

//@@end

}

like this u can add any no of steps.

Regards,

Sri

former_member205363
Contributor
0 Kudos

Thanks to Every body........