on 10-19-2011 5:38 PM
HI,
I am getting context exception like as
com.sap.tc.webdynpro.progmodel.context.ContextException: Path 'null' does not point to an attribute, but to View(path=AccountComp/AccountHistory, class=com.sap.tc.webdynpro.progmodel.generation.DelegatingView)
i created context as
Node --> category
Attribute --> Category.description
Node -->Source
Node--> points
Attribute --> Source.Points.sdate
Attribute -->Source.points.Edate
Attribute --> Source.points.label
and to set the values for the attribute in a loop i created the nodes added the element to it like as
IPublicAccountComp.ICategoryNode dnode = wdContext.nodeCategory();
for (int i = 0; i < CategoryValues.length; i++)
{
IPublicAccountComp.ICategoryElement cat1 = dnode.createCategoryElement();
cat1.setDescription(CategoryValues<i>);
wdContext.nodeCategory().addElement(cat1);
}
for (int i = 0; i < CatLabels.length; i++)
{ IPublicAccountComp.ISourceNode snode = wdContext.nodeSource();
IPublicAccountComp.ISourceElement src= snode.createSourceElement();
IPublicAccountComp.IPointsNode oupt1 = snode.nodePoints();
IPublicAccountComp.IPointsElement pEle = oupt1.createPointsElement();
pEle.setCuID(CatLabels<i>);
pEle.setStartValue(startDate<i>);
pEle.setEndValue(endDate<i>);
oupt1.addElement(pEle);
wdContext.nodeSource().addElement(src);
}
}
i dont know where i went wrong would you please help me in this
Thanks
Anu
You are creating element Source and then creating child element Points before adding the parent element Source first
You need to create and then add the element before you can add a child node to it
Hope this explains,
Robin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
solved
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.