cancel
Showing results for 
Search instead for 
Did you mean: 

How to set Value Attribute (under valu node) at run time

Former Member
0 Kudos

Hi,

This is my View context.

wbsElement (Value Attribute of Type String)

This is my Component Controller Context.

Project_info (Value node)->Wbs_Info (Value Node)-WBS(Value Attribute).

Initially I want to set some dummy values to wbsElement(view attribute),sothat I can show that in drop downby key.

On selecting of wbsElement I want to pass the selected value to component controllers ValueAttribute - WBS (this Value attribute is under 2 nodes-see the structure I've given).

I tried this way which is not working fine.

IWDNodeElement element = wdContext.createWBSElement();

wdContext.nodeWBS().addElement(element);

wdContext.currentWBSElement().setWBS(wbsElement);

Can anyone tell me which is the correct way to do this?

This is very urgent.plz help me in this.Thankx in advance.

Regards,

Karthick

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Karthick,

try this code.

IPublic<compcontrolllername>.IWbc_infoElement obj = wdThis.wdGet<Componentcontrollername>Controller().wdGetContext().createWbc_infoeElement();

obj.setWBS(wdcontest.currentContestElement.getwbsElement());

wdThis.wdGet<Componentcontrollername>Controller().wdGetContext().nodeWbc_infoElement().addelement(obj);

set the cardinality of Project_info to 1:n or 1:1

test this one

if you find any problem let em know

regars

Naidu

Former Member
0 Kudos

Hi,

Try the following.

IPrivate<ViewName>.IProject_infoElement TopEle=wdContext.createProject_infoElement();

TopEle.setXXX( "");

wdContext.nodeProject_info().addElement(TopEle);

IPrivate<ViewName>.IWbs_Info Element InfoEle=wdContext.createWbs_Info Element();

InfoEle.setYYY("");

ToEle.nodeWbs_Info ().addElement(InfoEle);

In the above case Child Node "Wbs_Info" singleton property should be set to false.

Regards, Anilkumar

Former Member
0 Kudos

Hi Anil kumar,

Thankx for your help.

I tried your suggestion

But I am getting the following error..

Type mismatch: cannot convert from IPublicNetworkScheduleComp.IProject_InfoElement to

IPrivateNetworkScheduleCompView.IProject_InfoElement

and ..

Type mismatch: cannot convert from IPublicNetworkScheduleComp.II_Wbs_InfoElement

to IPrivateNetworkScheduleCompView.II_Wbs_InfoElement

Help me plz.

Regards,

Karthick