on 03-01-2006 11:49 AM
Hello!
As in example I've inserted in context a special recursive Child node and then assigned parent node to this node's "repeated node" property. Parent node is mapped to the following JavaBean:
public class TreeNode {
/**
*/
Integer id;
Integer parentId;
String name;
Boolean hasChildren;
public TreeNode() {
super();
// TODO Auto-generated constructor stub
}
/**
@return Returns the parentId.
*/
public Integer getParentId() {
return parentId;
}
/**
@param parentId The parentId to set.
*/
public void setParentId(Integer parentId) {
this.parentId = parentId;
}
/**
@return Returns the id.
*/
public Integer getId() {
return id;
}
/**
@param id The id to set.
*/
public void setId(Integer id) {
this.id = id;
}
/**
@return Returns the name.
*/
public String getName() {
return name;
}
/**
@param name The name to set.
*/
public void setName(String name) {
this.name = name;
}
/**
@return Returns the hasChildren.
*/
public Boolean getHasChildren() {
return hasChildren;
}
/**
@param hasChildren The hasChildren to set.
*/
public void setHasChildren(Boolean hasChildren) {
this.hasChildren = hasChildren;
}
public List getTreeNodes() {
ModelClass model = new ModelClass();
return (List) model.getTreeNodes();
}
public List getRootNodes() {
ModelClass model = new ModelClass();
return (List) model.getRootNodes();
}
public List getChildNodes() {
ModelClass model = new ModelClass();
return (List) model.getChildNodes(getParentId());
}
public static void main(String args[]) {
ModelClass model = new ModelClass();
model.getTreeNodes();
}
}
When I'm trying to deploy and run application I get the following exception:
"com.sap.tc.webdynpro.progmodel.context.ContextException: RecursiveNodeInfo(MainView.TreeNode.Child): you cannot add a recursive child to a mapped node mapped to a data node without recursion"
Can anybody help?
Evgeniy,
Looks like you have created non-recursive node in component-controller / custom-controller, and then map recursive node in view-controller to it.
If so, then simply make node in component-controller recursive (via adding recursion node). Supply function (if any) must reside in component-controller as well.
VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
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.