on 09-13-2006 9:27 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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).
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);
}
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?
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);
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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);
}
}
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.