cancel
Showing results for 
Search instead for 
Did you mean: 

WD Roadmap project

Former Member
0 Kudos

Does somebody has an example of a roadmapproject or documentation? I saw the help functions, but i want to see an example in combination with the code

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi dresen,

First insert a RoadMap UIElement into your Root container.

on right click of that UI eLement you will get a popup. select the insert step on the popup. you should insert the steps on the roadmap that how many you need on your view. these steps are displayed as rectangular boxes.

create one context attribute (ex: Road) and bind it to the selectedStep property of the roadmap.

Every step has 3 major properties. there are description, id and name. the description is the text which will be shown below every roadmap steps. the name is the name text of the step this will be displayed on every step(rectangular boxes).

The id property is used to select the roadmap step if you want particular one would be selected.

for example, if you have 3 roadmap steps.These have descriptions namely Create, Edit and Save. and they have name property as 1,2 and 3 respectively. Their id's are create, edit and save respectively.

And you have 3 buttons namely CreateButton, EditButton and SaveButton. in the action of create button write,

wdContext.currentContextElement().setRoad("create");

And in the action of edit button write,

wdContext.currentContextElement().setRoad("edit");

finally in the action of save button write,

wdContext.currentContextElement().setRoad("save");

here the "create", "edit" and "save" are the id's of the corresponding steps.

hope this will help you.

regards

karthik

Former Member
0 Kudos

Karthikeyan Ramasamy

so for the navigation beteen the steps I need to make actions and use only this code for the action?

wdContext.currentContextElement().setRoad("edit");

and what is I want to navigate between trays

Former Member
0 Kudos

Hi dresen,

Eexplain your scenario little bit more. because i didn't

understand the navigation b/w trays.

regards

karthik

Former Member
0 Kudos

I have 3 views and 5 roadmapsteps. The first step should trigger the view. step3-5 should show and hide trays. or should i do something else? I want not to many views because of maintance reasons (working with forms).

Former Member
0 Kudos

Hi,

Your need is if you click roadmap step 1, it should show the view.

Then if you click step 3, it will show the tray and step 5 will hide the tray when it is clicked. correct?

regards

karthik

Former Member
0 Kudos

that is correct, but i want to use back and next buttons to move to the next step

Former Member
0 Kudos

Hi dresen,

First time you should show the view. you said that if you click next button then roadmap moves to next step. but where the tray is located? and which view comes in which step?

Former Member
0 Kudos

the roadmap is a sepearte view. the tray is an a viewcontainer from an other view.

first steps activates the view and second steps activate a tray.

Former Member
0 Kudos

Hi dresen,

Create one Action and bind it to the onACtion property of roadmap. and also create one String attribute then bind it with the description or name property of the roadmap.

when you click the roadmap, you can get the name or description of the step which is clicked at that time. depending upon that you can go to further process.

create a wdvisiblity property in component controller's context. and map it with the roadmap view and to the tray view. in tray view bind the visibility attribute to visible property of the tray.

you can show or hide the tray wherever you want(that is in any step depends on your need).

Former Member
0 Kudos

so first step is choosing and triggering the right view and the others is triggering the right viewcontainer or tray. how does this look like in code?

Former Member
0 Kudos

Hi,

write in onAction Event of roadmap,

String stepName=wdContext.currentContextElement().get<name_attribute>();

if(stepName.equals("1") // to activate view

{

wdFirePlugTo<view_toactivate>();

}

else if(stepName.equals("2") // to show tray

{

wdContext.currentContextElement().set<visible_attribute>(WDVisibility.VISIBLE);

}

else if(stepName.equals("5") // to hide tray

{

wdContext.currentContextElement().set<visible_attribute>(WDVisibility.NONE);

}

Former Member
0 Kudos

the roadmap is a separete view. I build a masterview with viewcontainers, on of the containers is the roadmap. Do i need to define plugs or can i do it via a interface controller?

How does the code look like then? so i first need to go to the view and then trigger the visibility

Former Member
0 Kudos

Hi dresen,

Do it with a help of plugs. define an outbound plug for roadmap view and inbound plug for the view which would be triggered. and in the onAction event, fire the plug which is given in previous post.

Former Member
0 Kudos

summary what i did:

I made a masterview in this masteriew i have 3 viecontainers which contains Iviews. Each view is binded via plugs.

I added the steps via the layout tab and rightmouseclick.

I made a action select and added this to the roadmap.

On the interface controler i made methods which need to make containers (in)visible. the code i am havind now is (<b>the reference to the view is missing here I don't know how to create this (help here please):</b>

wdContext.currentContextElement().setWDVisibiltyPosView(WDVisibility.VISIBLE);

So any idea if this can be better or how looks like in coding?

Former Member
0 Kudos

Hi dresen,

Do you want to trigger the view? then in the Action part write wdThis.wdFirePlugTo<OutboundPlugName>();

This outbound plug is created for the road map view and which has connected to the inbound plug of the triggered view.

Answers (1)

Answers (1)

Former Member
0 Kudos

In your Context for your view a new Node:

ReasonSteps (Node)

- Description (Attribute, String)

- ID (Attribute, String)

Layout:

new RoadMap (ReasonRoadMap)

- Propertie: selectedStep > value: ReasonSteps.ID

Implementation:

public void wdDoInit() {

//@@begin wdDoInit()

initProcessSteps();

//@@end

}

private void initProcessSteps() {

// could be any Node offcourse.

int reasons = wdContext.nodeReason().size();

IReasonStepsElement step;

for (int i=1; i<=reasons; i++) {

step = wdContext.createReasonStepsElement();

step.setID(Integer.toString(i));

step.setDescription("Reason" +i);

wdContext.nodeReasonSteps().addElement(step);

}

}

public static void wdDoModifyView(bla, bla, bla) {

IWDRoadMap roadmap = (IWDRoadMap) view.getElement("ReasonRoadMap");

int select = wdContext.nodeReasonSteps().getLeadSelection();

if (firstTime == true) {

wdContext.nodeReasonSteps().moveFirst();

for (int i = 1; i <= wdContext.nodeReasonSteps().size(); i++) {

IWDRoadMapStep step = (IWDRoadMapStep) view.createElement(IWDRoadMapStep.class,

wdContext.currentReasonStepsElement().getID());

step.setDescription(wdContext.currentReasonStepsElement().getDescription());

roadmap.addStep(step);

wdContext.nodeReasonSteps().moveNext();

}

wdContext.nodeReasonSteps().moveTo(select);

}

}

Former Member
0 Kudos

where do i need to put this code

private void initProcessSteps() {

// could be any Node offcourse.

int reasons = wdContext.nodeReason().size();

IReasonStepsElement step;

for (int i=1; i<=reasons; i++) {

step = wdContext.createReasonStepsElement();

step.setID(Integer.toString(i));

step.setDescription("Reason" +i);

wdContext.nodeReasonSteps().addElement(step);

}

}

Former Member
0 Kudos

Either into the user coding area <b>//@@begin others</b> or explicitly create the method in the controller editor.

Armin

Former Member
0 Kudos

How do I create that the first step is selected?

Former Member
0 Kudos

Hi,

There is a property called "selectedStep" of the RoadMap UI element. This contains the ID of the selected step. So if you want to keep the first step as selected then set this property to the ID of the first step.

Regards,

Satyajit.