public class ThesauruscategoryAction extends ActionSupport {
private String id;
private String text;
private boolean hasChildren;
private boolean isexpand;//
private boolean complete;//是否展开子节点
private String value;
private List<ThesauruscategoryAction> ChildrenNodes;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public boolean isHasChildren() {
return hasChildren;
}
public void setHasChildren(boolean hasChildren) {
this.hasChildren = hasChildren;
}
public boolean isIsexpand() {
return isexpand;
}
public void setIsexpand(boolean isexpand) {
this.isexpand = isexpand;
}
public boolean isComplete() {
return complete;
}
public void setComplete(boolean complete) {
this.complete = complete;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public List<ThesauruscategoryAction> getChildrenNodes() {
return ChildrenNodes;
}
public void setChildrenNodes(List<ThesauruscategoryAction> childrenNodes) {
ChildrenNodes = childrenNodes;
}
@Action(value="sendNode",results={
@Result(name="success",type="json")
})
public String sendNode(){
List<ThesauruscategoryAction> list=new ArrayList<ThesauruscategoryAction>();
ThesauruscategoryAction tree1 = new ThesauruscategoryAction();//root
tree1.setId("1");
tree1.setText("中国");
tree1.setHasChildren(true);
tree1.setIsexpand(false);
tree1.setComplete(false);//root
tree1.setValue("86");
List<ThesauruscategoryAction> tree = new ArrayList<ThesauruscategoryAction>();//children
tree1.setChildrenNodes(tree);
ThesauruscategoryAction tree2 = new ThesauruscategoryAction();//firstchild
ThesauruscategoryAction tree3 = new ThesauruscategoryAction();//secondchild
ThesauruscategoryAction tree4 = new ThesauruscategoryAction();//thirdchild