All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sourceforge.web.easyui.EasyuiTree Maven / Gradle / Ivy

Go to download

本项目主要弥补在使用mybatis3+springmvc+jquery easyui快速搭建web应用系统是遇到的框架不足. 主要工作包括: 1,扩展了ApplicationContextAware,通过单例注入spring容器,提供spring容器外的bean获取方法 2,扩展了apache shiro框架,统一了安全结构 3,扩展了mybatis3拦截器,在两个拦截器中自动完成分页注入,实现内存分页。 4,分页设计数据库方言 5,提供了一个easyuigrid的模型 6,提供了java泛型的jstl 7, xml工具包等一些小工具

The newest version!
package net.sourceforge.web.easyui;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * 

Tree Data Format

*

* Every node can contains following properties: *

*
    *
  • id: node id, which is important to load remote data
  • *
  • text: node text to show
  • *
  • state: node state, 'open' or 'closed', default is 'open'. When set to * 'closed', the node have children nodes and will load them from remote * site
  • *
  • checked: Indicate whether the node is checked selected.
  • *
  • attributes: custom attributes can be added to a node
  • * *
  • children: an array nodes defines some children nodes
  • *
* sample data: * *
 * [{
    "id":1,
    "text":"Folder1",
    "iconCls":"icon-save",
    "children":[{
        "text":"File1",
        "checked":true
    },{
        "text":"Books",
        "state":"open",
        "attributes":{
            "url":"/demo/book/abc",
            "price":100
        },
        "children":[{
            "text":"PhotoShop",
            "checked":true
        },{
            "id": 8,
            "text":"Sub Bookds",
            "state":"closed"
        }]
    }]
},{
    "text":"Languages",
    "state":"closed",
    "children":[{
        "text":"Java"
    },{
        "text":"C#"
    }]
}]
 * 
* * tree node structure * * @author alex * */ public class EasyuiTree { private String id; private String text; private String state; private boolean checked; private Map attributes; private List children; private String iconCls; private String href; 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 String getState() { return state; } public void setState(String state) { this.state = state; } public boolean isChecked() { return checked; } public void setChecked(boolean checked) { this.checked = checked; } public Map getAttributes() { return attributes; } public void setAttributes(Map attributes) { this.attributes = attributes; } public List getChildren() { return children; } public void setChildren(List children) { this.children = children; } public void addChild(EasyuiTree child) { if (this.children == null) { children = new ArrayList(); } children.add(child); } public String getIconCls() { return iconCls; } public void setIconCls(String iconCls) { this.iconCls = iconCls; } public String getHref() { return href; } public void setHref(String href) { this.href = href; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy