摘要: 通常我们利用ext树显示部门信息的时候,需要显示部门的关联关系或者是上下级关系,那么,我们就需要传给ext树固定格式的json,下面我们就进行json的拼装。首先我们假定A部门是B部门的上级部门我们利用面向对象的原理创建一个简单的树节点对象,如下:package pojo;/** * ext树节点 * * @author huang * */public class StoreTreeNode { private String id; private Boolean leaf = false; private String text; private String ... 阅读全文
posted @ 2012-06-17 12:43 园林鸟 阅读(1322) 评论(0) 推荐(0) 编辑
摘要: public List queryPage(Class clazz, String[] cascades, int start, int limit, List<Criterion> exs) { Criteria criteria = getSession().createCriteria(clazz); /** * 设置分页限制 */ if (cascades.length > 0) { for (String c : cascades) { ... 阅读全文
posted @ 2012-06-17 12:20 园林鸟 阅读(1654) 评论(0) 推荐(0) 编辑
摘要: 主要实现的是高级查询面板向后台传递参数,自动装配,进行查询。高级查询面板的代码如下: var searchForm = new Ext.FormPanel({ labelWidth : 35, layout : 'column', floating : false, bodyStyle : 'padding:5px 5px 0', draggable : false, defaults : { width : 230 }, defaultType : 'textfield', items : [{ fieldLabel : '用户名 阅读全文
posted @ 2012-05-13 11:20 园林鸟 阅读(4908) 评论(0) 推荐(0) 编辑
摘要: Ext.require(['Ext.window.Window', 'Ext.tab.*', 'Ext.toolbar.Spacer', 'Ext.layout.container.Card', 'Ext.layout.container.Border']);Ext.onReady(function() { Ext.create('Ext.Window', { title : '管理员须知', width : 400, height : 50, id:'knowwin' 阅读全文
posted @ 2012-05-08 13:57 园林鸟 阅读(492) 评论(0) 推荐(0) 编辑
摘要: /* * * This file is part of Ext JS 4 * * Copyright (c) 2011 Sencha Inc * * Contact: http://www.sencha.com/contact * * GNU General Public License Usage This file may be used under the terms of the * GNU General Public License version 3.0 as published by the Free Software * Foundation and appearin... 阅读全文
posted @ 2012-05-04 21:30 园林鸟 阅读(8784) 评论(0) 推荐(0) 编辑
摘要: Ext.require(["Ext.grid.*", "Ext.data.*"]);Ext.onReady(function() { Ext.QuickTips.init(); Ext.define("MyData", { extend : "Ext.data.Model", fields : ["id", { name : "id", mapping : "id" }, { name : "username", mapping : & 阅读全文
posted @ 2012-04-28 16:42 园林鸟 阅读(4718) 评论(0) 推荐(0) 编辑
摘要: 在生成表的时候遇到了这样一个问题,将主键放到父类中去,其他的实体表继承主键@Entity@Table(name = "base_table")public class BaseEntity { public BaseEntity() { } @Id @GenericGenerator(name = "idGenerator", strategy = "uuid") @GeneratedValue(generator = "idGenerator") @Column(name = "id", un 阅读全文
posted @ 2012-04-20 23:24 园林鸟 阅读(3642) 评论(0) 推荐(0) 编辑
摘要: The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. at sun.reflect.GeneratedConstructorAccessor15.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.ja 阅读全文
posted @ 2012-04-20 10:33 园林鸟 阅读(49718) 评论(0) 推荐(0) 编辑
摘要: @ManyToMany(mappedBy = "friends", cascade = { CascadeType.PERSIST }, fetch = FetchType.LAZY) private List<User> owns; @ManyToMany(cascade = { CascadeType.PERSIST }, fetch = FetchType.LAZY) @JoinTable(name = "friends_middle", joinColumns = { @JoinColumn(name = "friendsI 阅读全文
posted @ 2012-04-19 19:32 园林鸟 阅读(2575) 评论(2) 推荐(0) 编辑
摘要: <?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.sprin 阅读全文
posted @ 2012-04-11 17:13 园林鸟 阅读(1554) 评论(0) 推荐(0) 编辑