java之easyUI后台工作和数据查询

本文介绍了如何在Java环境下使用EasyUI进行后台工作和数据查询。内容包括实体类book.java、Module.java的创建,BookDao.java的三层架构设计,以及servlet中的BookListServlet.java和BookServlet.java实现数据交互。同时展示了主界面index.jsp和公告界面head.jsp的搭建,附带实际效果展示。
摘要由CSDN通过智能技术生成

从数据库拿数据,并把值绑到界面上去

实体类:book.java

package com.zking.etity;

import java.io.Serializable;


public class Book implements Serializable{
	
	private static final long serialVersionUID = 1L;
	private int bid;
	private String bname;
	private int bprice;
	private String btype;
	public int getBid() {
		return bid;
	}
	public void setBid(int bid) {
		this.bid = bid;
	}
	public String getBname() {
		return bname;
	}
	public void setBname(String bname) {
		this.bname = bname;
	}
	public int getBprice() {
		return bprice;
	}
	public void setBprice(int bprice) {
		this.bprice = bprice;
	}
	public String getBtype() {
		return btype;
	}
	public void setBtype(String btype) {
		this.btype = btype;
	}
	
	public Book() {
		// TODO Auto-generated constructor stub
	}
	public Book(int bid, String bname, int bprice, String btype) {
		super();
		this.bid = bid;
		this.bname = bname;
		this.bprice = bprice;
		this.btype = btype;
	}
	
	public Book(String bname, int bprice, String btype) {
		this.bname = bname;
		this.bprice = bprice;
		this.btype = btype;
	}
	@Override
	public String toString() {
		return "Book [bid=" + bid + ", bname=" + bname + ", bprice=" + bprice + ", btype=" + btype + "]";
	}
	
	

}

Module.java

package com.zking.etity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**实体类
 * @author zjjt
 *
 */
public class Module implements Serializable {
	
	
	private static final long serialVersionUID = 6951631954282202090L;
	private int id;
	private int pid;
	private String text;
	private String url;
	private String iconCls;
	private int sort;
	
	//子节点集合
	private  List<Module> children =new ArrayList<Module>();

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getPid() {
		return pid;
	}

	public void setPid(int pid) {
		this.pid = pid;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getIconCls() {
		return iconCls;
	}

	public void setIconCls(String iconCls) {
		this.iconCls = iconCls;
	}

	public int getSort() {
		return sort;
	}

	public void setSort(int sort) {
		this.sort = sort;
	}

	public List<Module> getChildren() {
		return children;
	}

	public void setChildren(List<Module> children) {
		this.children = children;
	}
	
	
	
	public Module() {
		// TODO Auto-generated constructor stub
	}

	public Module(int id, int pid, String text, String url, String iconCls, int sort, List<Module> children) {
		super();
		this.id = id;
		this.pid = pid;
		this.text = text;
		this.url = url;
		this.iconCls = iconCls;
		this.sort = sort;
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值