on 11-12-2008 5:40 AM
Hi,
I have two value nodes Ctx_vn_Skills_Copy and Ctx_vn_ProjectDetails.I want to copy the value of value attribute 'SkillID' from Ctx_vn_Skills_Copy to Ctx_vn_ProjectDetails. For that i have used the following code.I get the value skillID of Ctx_vn_Skills_Copy right but for SkillID of Ctx_vn_ProjectDetails i get a null value.Where am i doing wrong??..and if i want to select multiple values of skillID from Ctx_vn_Skills_Copy selected and copied to Ctx_vn_ProjectDetails, then what should be the change in my code??
public void savedata( )
{
String skill_id ="";
IPublicTdc_UICust.ICtx_vn_Skills_CopyNode copynode = wdContext.nodeCtx_vn_Skills_Copy();
IPublicTdc_UICust.ICtx_vn_Skills_CopyElement copyelement = null;
for(int i=0;i<copynode.size();i++)
{
copyelement = copynode.getCtx_vn_Skills_CopyElementAt(i);
skill_id = wdContext.currentCtx_vn_Skills_CopyElement().getSkillID();
}
wdComponentAPI.getMessageManager().reportSuccess(""+ skill_id );
wdComponentAPI.getMessageManager().reportSuccess("success");
IPublicTdc_UICust.ICtx_vn_ProjectDetailsNode prodetnode = wdContext.nodeCtx_vn_ProjectDetails();
IPublicTdc_UICust.ICtx_vn_ProjectDetailsElement prodetele = null;
for(int i=0;i<prodetnode.size();i++)
{
copyelement = copynode.createCtx_vn_Skills_CopyElement();
prodetele = prodetnode.currentCtx_vn_ProjectDetailsElement();
prodetele.setCtx_va_skillid(copyelement.getSkillID());
}
wdComponentAPI.getMessageManager().reportSuccess("SKILLID"+ wdContext.currentCtx_vn_ProjectDetailsElement().getCtx_va_skillid());
//@@end
}
Hi
use this
wdCopyService.copyElements(wdContext.node<ModelNodeName>,wdContext.node<ValueNodeName>);
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Parama,
i would sugget you to create same no of "value attributes" and set the type equal types. and the apply
WdCopyService() method. ,
otherwise you have to follow long process.
by iterateing thru node and then getting attribute value and then once again putting that value to another node attribute value.
Thanks
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.