Hibernate+Spring+Struts2+ExtJS开发CRUD功能

http://blog.csdn.net/myloon/archive/2007/11/08/1873652.aspx-----多谢这么好的文章

Hibernate+Spring+Struts2+ExtJS开发CRUD功能
1、 入门:
各种开源框架环境及下载:
Hibernate:3.x http://www.hibernate.org/ 需要hibernate core 和annotations 包。
Spring:2.x http://springframework.org/
Struts2:2.x http://struts.apache.org/2.x/
ExtJS:2.X http://extjs.com/
JSON:JSON可以到http://www.json.org/ 查看详细内容,这里使用json-lib http://json-lib.sourceforge.net/
本所需要的包:

2、 配置:
(1)首先是配置web.xml,配置方法可以在下面的配置文件代码注释中查看,这里主要是Struts2的配置:
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
和Spring的配置:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring/*.xml</param-value>
</context-param>
<listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
Web.xml的全部文件:
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>struts2</display-name>
<!-- Spring ApplicationContext配置文件的路径,可使用通配符*,多个路径用,号分隔,此参数用于后面的Spring-Context loader -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring/*.xml</param-value>
</context-param>
<!-- 著名 Character Encoding filter -->
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>

<!-- struts2 滤镜配置 -->
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>

<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!--Spring ApplicationContext 载入 ,必须-->
<listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

<!-- Spring 刷新Introspector防止内存泄露 -->
<listener>
<listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
</listener>
<!-- session超时定义,单位为分钟 -->
<session-config>
<session-timeout>10</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>
(2)Hibernate配置:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!—-数据库驱动类名称 -->
<property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<!—-数据库用户名 -->
<property name="hibernate.connection.username">MY</property>
<property name="hibernate.default_schema">MY</property>
<!—-数据库用户密码 -->
<property name="hibernate.connection.password">MY</property>
<!—-数据库连接字符串-->
<property name="hibernate.connection.url">jdbc:oracle:thin:@localhost:1521:loon</property>
<property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
<!—-控制台是否输出SQL语句 -->
<property name="hibernate.show_sql">true</property>
<mapping class="privilege.database.Level" />
</session-factory>
</hibernate-configuration>
(3)Spring基本配置:配置文件应该在WEB-INF/spring/下面
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans default-autowire="autodetect">
<!—如果用的是XML配置文件,sessionFactory用这个配置 "org.springframework.orm.hibernate3.LocalSessionFactoryBean" -->
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="configLocation">
<value>classpath:hibernate.cfg.xml</value>
</property>
<!-- 配置多个hibernate.cfg.xml
<property name="configLocations">
<list>
<value>classpath:hibernate_admin1.cfg.xml</value>
<value>classpath:hibernate_admin2.cfg.xml</value>
</list>
</property>
-->
</bean>
<!-- Hibernate 事务管理 -->
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<bean id="baseTransactionProxy" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean" abstract="true">
<property name="transactionManager" ref="transactionManager" />
<property name="transactionAttributes">
<props>
<prop key="find*">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="persist*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="remove*">PROPAGATION_REQUIRED,-Exception</prop>
<!--
<prop key="insert*">PROPAGATION_REQUIRED</prop>
<prop key="save">PROPAGATION_REQUIRED</prop>
<prop key="update*">PROPAGATION_REQUIRED</prop>
<prop key="edit*">PROPAGATION_REQUIRED</prop>
<prop key="del*">PROPAGATION_REQUIRED</prop>
<prop key="get*">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="query*">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="disPlay*">PROPAGATION_REQUIRES_NEW</prop>
-->
</props>
</property>
</bean>

<bean id="LevelService" parent="baseTransactionProxy">
<property name="target">
<bean class="privilege.service.LevelService">
<property name="dao">
<bean class="privilege.dao.LevelDAO">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
</property>
</bean>
</property>
</bean>
<bean id="LevelAction" class="privilege.action.LevelAction">
<property name="levelService" ref="LevelService" />
</bean>
</beans>
(4)struts.xml文件的配置:
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="privilege" extends="struts-default">
<action name="LoadLevel" class="LevelAction" method="findLevelById">
<result>/resource/json_struts2.jsp</result>
</action>
<action name="LevelAjaxJsonData" class="LevelAction" method="jsonExecute">
<result>/resource/json_struts2.jsp</result>
</action>
</package>
</struts>
3、 建立的项目目录:
Root:
/resource/ext2.0/ 将下载的ext-2.0-beta1.zip文件解压到该目录
/WEB-INF/web.xml
/WEB-INF/lib
/WEB-INF/classes/struts.xml
/WEB-INF/spring/applicationContext.xml
4、 代码清单:
Level.java

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;


@Entity
@Table(name = "LOON_LEVEL")
public class Level implements java.io.Serializable {
private Long levelid;
private String levelname;
private String description;

public Level() {
}

public Level(Long levelid) {
this.levelid = levelid;
}

public Level(Long levelid, String levelname, String description) {
this.levelid = levelid;
this.levelname = levelname;
this.description = description;
}

@Id
@Column(name = "LEVELID", unique = true, nullable = false, precision = 5, scale = 0)
public Long getLevelid() {
return this.levelid;
}

public void setLevelid(Long levelid) {
this.levelid = levelid;
}

@Column(name = "LEVELNAME", length = 64)
public String getLevelname() {
return this.levelname;
}

public void setLevelname(String levelname) {
this.levelname = levelname;
}

@Column(name = "DESCRIPTION", length = 256)
public String getDescription() {
return this.description;
}

public void setDescription(String description) {
this.description = description;
}
}

ILevelDAO.java

import java.util.List;
public interface ILevelDAO {
public Level findLevelById(Long id);
public List<Level> findAllLevels();
public void persistLevel(Level level);
public void removeLevel(Level level);
public void removeById(Long id);
}

LevelDAO.java

import java.util.List;
import org.hibernate.Session;
import org.springframework.orm.hibernate3.HibernateCallback;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
public class LevelDAO extends HibernateDaoSupport implements ILevelDAO {
public LevelDAO() {
super();
}
public Level findLevelById(Long id) {
return (Level) getHibernateTemplate().get(Level.class, id);
}
public List<Level> findAllLevels() {
return getHibernateTemplate().loadAll(Level.class);// .find("from Level o");//
}
public void persistLevel(Level level) {
getHibernateTemplate().saveOrUpdate(level);
}
public void removeLevel(Level level) {
getHibernateTemplate().delete(level);
}

public void removeById(final Long id) {
this.getHibernateTemplate().execute(new HibernateCallback() {
public Object doInHibernate(Session session) {
session.createQuery("delete from Level o where o.levelid=" + id + "").executeUpdate();
return 1;
}
});
}
}

ILevelService.java

import java.util.List;
public interface ILevelService {
public Level findLevelById(Long id) throws Exception;
public List<Level> findAllLevels() throws Exception;
public List<Level> findLevelsByExample(Level level) throws Exception;
public void persistLevel(Level level) throws Exception;
public void removeLevel(Level level) throws Exception;
public void removeLevelById(Long id) throws Exception;
}

LevelService.java

import java.util.List;
import privilege.dao.*;
import privilege.database.Level;
import org.springframework.context.ApplicationContext;
public class LevelService implements ILevelService {
private ILevelDAO dao;
private static final String SERVICE_BEAN_ID = "LevelService";
public LevelService() {
super();
}
public static ILevelService getInstance(ApplicationContext context) {
return (ILevelService) context.getBean(SERVICE_BEAN_ID);
}
public Level findLevelById(Long id) throws Exception {
try {
return getDao().findLevelById(id);
} catch (RuntimeException e) {
throw new Exception("findLevelById failed with the id " + id + ": " + e.getMessage());
}
}
public void persistLevel(Level level) throws Exception {
try {
getDao().persistLevel(level);
} catch (RuntimeException e) {
throw new Exception("persistLevel failed: " + e.getMessage());
}
}
public void removeLevel(Level level) throws Exception {
try {
getDao().removeLevel(level);
} catch (RuntimeException e) {
throw new Exception("removeLevel failed: " + e.getMessage());
}
}
public void removeLevelById(Long id) throws Exception {
try {
getDao().removeById(id);
} catch (RuntimeException e) {
throw new Exception("removeLevel failed: " + e.getMessage());
}
}

public void setDao(ILevelDAO dao) {
this.dao = dao;
}
public ILevelDAO getDao() {
return this.dao;
}
}

ExtJSONActionSuport.java
辅助类,继承了ActionSupport
import com.opensymphony.xwork2.ActionSupport;

public class ExtJSONActionSuport extends ActionSupport {
private int totalCount = 0;// 总数
private transient int start = 0;// 开始数
private transient int limit = 0;// 限制数量
private String jsonString = "";

public String getJsonString() {
return jsonString;
}

public void setJsonString(String jsonString) {
this.jsonString = jsonString;
}

public String jsonExecute() throws Exception {
return super.execute();
}



public int getTotalCount() {
return totalCount;
}

public void setTotalCount(int totalCount) {
this.totalCount = totalCount;
}

public int getStart() {
return start;
}

public void setStart(int start) {
this.start = start;
}

public int getLimit() {
return limit;
}

public void setLimit(int limit) {
this.limit = limit;
}
}


LevelAction.java

import java.util.List;
import java.util.ArrayList;
import javax.servlet.http.HttpSession;
import org.apache.struts2.ServletActionContext;
import net.sf.json.JSONArray;
import privilege.database.Level;
import privilege.service.*;
import commons.utils.action.ExtJSONActionSuport;

public class LevelAction extends ExtJSONActionSuport {
private static final long serialVersionUID = 1L;
private Level level = null;
private List<Level> levels = new ArrayList<Level>(0);
private ILevelService levelService = null;
private String delData;

public String execute() {
return this.SUCCESS;
}

@Override
public String jsonExecute() throws Exception {
if (this.getDelData() != null && !"".equals(this.getDelData())) {
if (this.getDelData().indexOf(",") < 0) {
this.levelService.removeLevelById(Long.parseLong(this.getDelData()));
System.out.println("del_id:" + getDelData());
} else {
String id[] = this.getDelData().split(",");
for (int i = 0; i < id.length; i++) {
System.out.println("del:" + id[i]);
this.levelService.removeLevelById(Long.parseLong(id[i]));
}
}
}
HttpSession session = ServletActionContext.getRequest().getSession();
Object o = null;// session.getAttribute("Level_Data1");
if (o == null) {
try {
this.levels = this.getLevelService().findAllLevels();
session.setAttribute("Level_Data1", this.levels);
System.out.println("query database");
} catch (Exception e) {
e.printStackTrace();
}
} else {
this.setLevels(((List<Level>) o));
}
this.setTotalCount(this.levels.size());
JSONArray array = JSONArray.fromObject(this.levels);
// System.out.println(this.getStart() + "---" + this.getLimit());
this.setJsonString("{success:true,totalCount : " + this.getTotalCount() + ", list:" + array.toString() + "}");
// System.out.println(this.getJsonString());
return super.jsonExecute();
}

/**
* Find an entity by its id (primary key).
*
* @param id
* @return The found entity instance or null if the entity does not exist.
*/
public String findLevelById(Long id) {
try {
this.level = this.getLevelService().findLevelById(id);
} catch (Exception e) {
e.printStackTrace();
}
JSONArray array = JSONArray.fromObject(this.levels);
this.setJsonString(array.toString());
return SUCCESS;
}

public String findLevelById() {
System.out.println(this.level.getLevelid());
try {
this.level = this.getLevelService().findLevelById(this.level.getLevelid());
} catch (Exception e) {
e.printStackTrace();
}
JSONArray array = JSONArray.fromObject(this.level);
this.setJsonString(array.toString());
this.setJsonString("{success:true,totalCount:1,list:" + array.toString() + "}");
System.out.println(array.toString());
return SUCCESS;
}

/**
* @return Return all persistent instances of the <code>Level</code> entity.
*/
public String getAllLevels() {
try {
this.levels = this.getLevelService().findAllLevels();
} catch (Exception e) {
e.printStackTrace();
}
return SUCCESS;
}


/**
* Make the given instance managed and persistent.
*
* @return
*/
public String persistLevel() {
System.out.println(this.level.getLevelid() + "---" + this.level.getLevelname() + "---"
+ this.level.getDescription());
this.setJsonString("{success:true}");
try {
this.getLevelService().persistLevel(this.getLevel());
} catch (Exception e) {
e.printStackTrace();
}
return SUCCESS;
}

/**
* Remove the given persistent instance.
*
* @return
*/
public String removeLevel() {
try {
this.getLevelService().removeLevel(this.getLevel());
} catch (Exception e) {
e.printStackTrace();
}
return SUCCESS;
}

/**
* Remove an entity by its id (primary key). *
*
* @return
*/
public String removeLevelById(Long id) {
try {
this.getLevelService().removeLevelById(id);
} catch (Exception e) {
e.printStackTrace();
}
return SUCCESS;
}

public Level getLevel() {
return level;
}

public void setLevel(Level level) {
this.level = level;
}

public List<Level> getLevels() {
return levels;
}

public void setLevels(List<Level> levels) {
this.levels = levels;
}

public ILevelService getLevelService() {
return levelService;
}

public void setLevelService(ILevelService levelService) {
this.levelService = levelService;
}

public String getDelData() {
return delData;
}

public void setDelData(String delData) {
this.delData = delData;
}
}
配置spring,添加:
<bean id="LevelService" parent="baseTransactionProxy">
<property name="target">
<bean class="privilege.service.LevelService">
<property name="dao">
<bean class="privilege.dao.LevelDAO">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
</property>
</bean>
</property>
</bean>
<bean id="LevelAction" class="privilege.action.LevelAction">
<property name="levelService" ref="LevelService" />
</bean>
配置struts.xml:
添加操作配置:
<action name="AddLevel" class="LevelAction" method="persistLevel">
<result>/resource/json_struts2.jsp</result>
</action>
修改时载入数据操作配置:
<action name="LoadLevel" class="LevelAction" method="findLevelById">
<result>/resource/json_struts2.jsp</result>
</action>
列表查询和删除数据时操作配置:
<action name="LevelAjaxJsonData" class="LevelAction" method="jsonExecute">
<result>/resource/json_struts2.jsp</result>
</action>

json_struts2.jsp :
这个页面是一个公用的页面,服务器段向客户端传输时用于JSON字符串的输出,特别注意的是:
<s:property>标签的escape属性一定要是false,默认是true,不然输出的JSON字符串被转码。
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%><%@ taglib prefix="s" uri="/struts-tags"%>
<s:property value="jsonString" escape="false" />

Level.jsp:
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>页面</title>
导入所需要的javascript类库和样式表:
<link rel="stylesheet" type="text/css" href="/my/resource/ext2.0/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="/my/resource/ext2.0/init.css" />
<script src="/my/resource/ext2.0/adapter/ext/ext-base.js" type="text/javascript"></script>
<script src="/my/resource/ext2.0/ext-core.js" type="text/javascript"></script>
<script src="/my/resource/ext2.0/ext-all.js" type="text/javascript"></script>
Init.jsp是自定义的javascript文件,这里有一些需要动态处理的内容,所以以jsp后缀名的方式导入,这个文件的内容可以参考Extjs解压后目录中examples/examples.js文件:
<script src="/my/resource/ext2.0/init.jsp" type="text/javascript"></script>
<script src="/my/resource/ext2.0/source/locale/ext-lang-zh_CN.js" type="text/javascript"></script>
Level.js是整个界面所写的js:
<SCRIPT type="text/javascript" src="Level.js"></SCRIPT>
<SCRIPT type="text/javascript">
Ext.BLANK_IMAGE_URL = /my/resource/ext2.0/resources/images/default/s.gif';
</SCRIPT>

<STYLE type="text/css">
.ss {
text-align: left;;
}
.icon-grid {
background-image: url(grid.png) !important;
}
.add {
background-image: url(new.png) !important;
}
.edit {
background-image: url(edit.png) !important;
}
.remove {
background-image: url(del.png) !important;
}
</STYLE>
</head>
<body class="x-vista">
<div id="topic-grid"></div>


<div id="topic-win" class="x-hidden">
<div class="x-window-header">Hello Dialog</div>
<div id="topic-tabs"></div>
</div>
</body>
</html>

Level.js文件:
myinit();//初始化
Ext.onReady(function() {
Ext.QuickTips.init();
var newFormWin;
var form1;
//定义一个JsonReader对象,用于表格列表数据显示,即grid对象
var _jsonReader = new Ext.data.JsonReader( {
root : 'list',
totalProperty : 'totalCount',
id : 'levelid',
successProperty : '@success'
}, [ {
name : 'levelid',
mapping : 'levelid',
type : 'int'
}, {
name : 'levelname',
mapping : 'levelname'
}, {
name : 'description',
mapping : 'description'
}]);
// Store对象,注意proxy配置参数,如果url : 'LevelAjaxJsonData.action'与程序在同一应用下面,就用new Ext.data.HttpProxy,如果不在同一应用中要用Ext.data.ScriptTagProxy对象
var ds = new Ext.data.Store( {
proxy : new Ext.data.HttpProxy( {
url : 'LevelAjaxJsonData.action'
}),
//
reader : _jsonReader
});
ds.setDefaultSort('levelid', 'desc');//设置默认的排序字段

// ColumnModel对象,用于grid对象中的列格式化配置
var cm = new Ext.grid.ColumnModel([new Ext.grid.RowNumberer(), {
id : 'levelid',
header : '序号',
dataIndex : 'levelid',
width : 40
}, {
header : "级别名称",
dataIndex : 'levelname',
width : 50,
sortable : true,
locked : false
}, {
header : "描述",
dataIndex : 'description',
width : 100
}]);
// by default columns are sortable
cm.defaultSortable = true;
// GridPanel对象
var grid = new Ext.grid.GridPanel( {
// var grid = new Ext.grid.EditorGridPanel( {
collapsible : true,// 是否可以展开
animCollapse : false,// 展开时是否有动画效果
title : '级别管理',
iconCls : 'icon-grid',
store : ds,
cm : cm,
renderTo : 'topic-grid',
viewConfig : {
forceFit : true
},
/*
* // 添加内陷的按钮 buttons : [ { text : '保存' }, { text : '取消' }],
* buttonAlign : 'center',// 按钮对齐
*
*/
// 添加分页工具栏
bbar : new Ext.PagingToolbar( {
pageSize : 30,
store : ds,
displayInfo : true,
displayMsg : '显示 {0}-{1}条 / 共 {2} 条',
emptyMsg : "无数据。",
items : ['-', {
pressed : true,
enableToggle : true,
text : '按钮',
cls : 'x-btn-text-icon details',
toggleHandler : ptb_bt1
}]
}),
// 添加内陷的工具条
tbar : [ {
id : 'New1',
text : ' 新建 ',
tooltip : '新建一个表单',
iconCls : 'add',
handler : function() {
ptb_bt1();
}
}, '-', {
text : '修改',
tooltip : '修改',
iconCls : 'edit',
handler : function() {
ptb_bt2();
}
}, '-', {
text : '删除',
tooltip : '删除被选择的内容',
iconCls : 'remove',
handler : function() {
ptb_bt3();
}
}],
width : 700,
height : 400,
frame : true,
loadMask : true,// 载入遮罩动画
autoShow : true
});
//数据载入
ds.load( {
params : {
start : 0,//开始数
limit : 30,//每次载入数量,服务器段就根据这两个参数来处理数据分页
forumId : 4
}
});
grid.render();
//添加行双击事件,双击是可以打开修改窗口
grid.on("rowdblclick", function(grid) {
loadFormData(grid);
});
// 载入被选择的数据行的表单数据
var loadFormData = function(grid) {
var _record = grid.getSelectionModel().getSelected();
if (!_record) {//这里判断是否有行已经被选择
Ext.example.msg('修改操作', '请选择要修改的一项!');
} else {
myFormWin();
form1.form.load( {
url : 'LoadLevel.action?level.levelid='
+ _record.get('levelid'),
waitMsg : '正在载入数据...',

failure : function() {
Ext.example.msg('编辑', '载入失败');
},
success : function() {
Ext.example.msg('编辑', '载入成功!');
}
});
}
}
// 分页工具栏按钮--新建事件
var ptb_bt1 = function() {
myFormWin();
};
// 修改操作事件
var ptb_bt2 = function() {
loadFormData(grid);
};
// 删除事件
var ptb_bt3 = function() {
var _record = grid.getSelectionModel().getSelected();
if (_record) {//判断是否有行被选择
Ext.MessageBox.confirm('确认删除', '你确认要删除这条数据吗?', function(btn) {
if (btn == "yes") {
var m = grid.getSelections();//所有被选择的行
var jsonData = "";//
for (var i = 0, len = m.length;i < len; i++) {
var ss = m[i].get("levelid");
if (i == 0) {
jsonData = jsonData + ss;
} else {
jsonData = jsonData + "," + ss;
}
ds.remove(m[i]);
}
ds.load( {
params : {
start : 0,
limit : 30,
delData : jsonData//这里是向服务器段发送的数据信息,一般采用JSON协议,这儿直接采用,只发送用逗号分割的ID号序列, 以方便
}
});

// Ext.example.msg('---删除操作---', '你删除的数据是');
}
});
} else {
Ext.example.msg('删除操作', '请选择要删除的数据项!');
}
};

// form_win定义一个Window对象,用于新建和修改时的弹出窗口。
var myFormWin = function() {
// create the window on the first click and reuse on subsequent
// clicks
if (!newFormWin) {
newFormWin = new Ext.Window( {
el : 'topic-win',
layout : 'fit',
width : 400,
height : 300,
closeAction : 'hide',
plain : true,
title : '窗口',
items : form1,
reader : _jsonReader
});
}
newFormWin.show('New1');
}
//用窗体Form的JsonReader对象,修改时数据载入解析
var _jsonFormReader = new Ext.data.JsonReader( {
root : 'list',
totalProperty : 'totalCount',
id : 'levelid',
successProperty : '@success'
}, [ {
name : 'level.levelid',
mapping : 'levelid',
type : 'int'
}, {
name : 'level.levelname',
mapping : 'levelname'
}, {
name : 'level.description',
mapping : 'description'
}]);

// 窗体
form1 = new Ext.FormPanel( {
// collapsible : true,// 是否可以展开
labelWidth : 75, // label settings here cascade unless overridden
url : 'AddLevel.action',
frame : true,
title : '添加级别',
bodyStyle : 'padding:5px 5px 0',
width : 350,
waitMsgTarget : true,
reader : _jsonFormReader,
defaults : {
width : 230
},
defaultType : 'textfield',
items : [ {
fieldLabel : '级别ID',
name : 'level.levelid',
allowBlank : false
}, {
fieldLabel : '级别名称',
name : 'level.levelname',
allowBlank : false
}, new Ext.form.TextArea( {
fieldLabel : '描述',
name : 'level.description',
growMin : 234
})],

buttons : [ {
text : '保存',
disabled : false,
handler : function() {
if (form1.form.isValid()) {
form1.form.submit( {
url : 'AddLevel.action',
success : function(from, action) {
Ext.example.msg('保存成功', '添加级别成功!');
ds.load( {
params : {
start : 0,
limit : 30,
forumId : 4
}
});
},
failure : function(form, action) {
Ext.example.msg('保存失败', '添加级别失败!');
},
waitMsg : '正在保存数据,稍后...'
});
dialog.hide();
} else {
Ext.Msg.alert('信息', '请填写完成再提交!');
}
}
}, {
text : '取消',
handler : function() {
newFormWin.hide();
}
}]
});
});
5、 运行时的一些图(Firefox 2.0):
数据列表:

新建:

修改:
未选择数据行

选择数据行后,单击修改按钮(双击数据行可直接修改)

删除数据:
删除时确认

确认后删除数据:

源代码下载:
下载 (不包括类库)下载后将后缀名修改为zip即可

发表于 @ 2007年11月08日 14:26:00 | 评论( 82 ) | 举报| 收藏
旧一篇:Java Web开发模型新构思——Hibernate/JPA…+Spring+Struts2/DWR…+ExtJS | 新一篇:用ExtJS 实现动态载入树(Load tree)

查看最新精华文章 请访问博客首页相关文章
关注内存 提高软件性能(3)自动循环播放的MP3播放器快速开发的十大神话一些C++的问题编程高手求职Struts原理、开发及项目实施JUnit的学习与使用ExtJS+DWR+Spring+Hibernate开发HRMS(2)
zz3zydy 发表于Thu Nov 08 2007 14:56:54 GMT+0800 (China Standard Time) 举报回复

你好:
想认真学习,请发一份带包的和源码的给我,谢谢。
128ydy@sina.com
umbrella_yxs 发表于Tue Nov 13 2007 09:47:18 GMT+0800 (China Standard Time) 举报回复

你好能不能发份给我??正在学习中……谢谢!
yangxuesong_snow@163.com
fishinsky 发表于Mon Nov 19 2007 13:38:40 GMT+0800 (China Standard Time) 举报回复

很想学学您的这个例子,我自己做了好长时间也没有跑起来,能给我一个可以运行的程序吗?我得邮箱zhaozhenfeng123@163.com(msn也是这个邮箱)
希望可以得到您的帮助
jjps2 发表于Mon Nov 19 2007 15:30:46 GMT+0800 (China Standard Time) 举报回复

能给我发一份 带包的代码 有几个包我没有找到!~
谢了!~
jjps2@126.com
wwylj 发表于Wed Nov 21 2007 23:03:44 GMT+0800 (China Standard Time) 举报回复

看到你的例子,真是太激动了,感谢!
iwangwei@126.com
song_n 发表于Wed Nov 28 2007 13:38:59 GMT+0800 (China Standard Time) 举报回复

能不能也给我一份
song_ning@126.com
或者上传让大家共享
Leon1509 发表于Fri Nov 30 2007 11:26:35 GMT+0800 (China Standard Time) 举报回复

怎么没有数据库建库脚本?
按照文章部署TOMCAT没法启动,提示:
2007-11-30 11:26:00 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\jdk1.5.0.10\bin;.;C:\windows\system32;C:\windows;C:\jdk1.5.0.10\jre\bin;C:\jdk1.5.0.10\bin\..\jre\bin\client;C:\jdk1.5.0.10\bin\..\jre\bin;.;C:\jdk1.5.0.10\bin;C:\Program Files\apache-ant-1.6.5\bin;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\PROGRA~1\F-Secure\SSHTRI~1;C:\Program Files\Common Files\NetSarang;C:\PROGRA~1\IBM\SQLLIB\BIN;C:\PROGRA~1\IBM\SQLLIB\FUNCTION;C:\PROGRA~1\IBM\SQLLIB\SAMPLES\REPL;E:\Software\Oracle\bin;C:\Program Files\IDM Computer Solutions\UEStudio\GNU\subversion;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\;E:\apache-ant-1.6.1\bin
2007-11-30 11:26:00 org.apache.coyote.http11.Http11BaseProtocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2007-11-30 11:26:00 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1482 ms
2007-11-30 11:26:00 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2007-11-30 11:26:01 org.apache.catalina.core.St
Leon1509 发表于Fri Nov 30 2007 11:27:38 GMT+0800 (China Standard Time) 举报回复

(10 ms) [main] ERROR: org.springframework.web.context.ContextLoader#initWebApplicationContext : Context initialization failed
(5177 ms) [main] ERROR: org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/crud]#listenerStart : Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
java.lang.OutOfMemoryError: Java heap space
2007-11-30 11:26:10 org.apache.catalina.core.StandardContext start
严重: Error listenerStart
2007-11-30 11:26:10 org.apache.catalina.core.StandardContext start
严重: Context [/crud] startup failed due to previous errors
Leon1509 发表于Fri Nov 30 2007 11:28:00 GMT+0800 (China Standard Time) 举报回复

楼主的开发环境是?
myloon 发表于Mon Dec 03 2007 18:05:34 GMT+0800 (China Standard Time) 举报回复

在Hibernate配置文件中加入
<property name="hibernate.hbm2ddl.auto">create</property>
后 运行一次,即可自动创建数据库,然后屏蔽这行代码再运行即可。
我的开发环境是:
Hibernate+Spring+Struts2+ExtJS2.0
eclipse+tomcat
JDK1.6
yamiqi 发表于Sat Dec 15 2007 14:03:36 GMT+0800 (China Standard Time) 举报回复

楼主,能不能给个联系方式呢??

有个问题想向你请教
gswgz 发表于Thu Jan 10 2008 12:51:39 GMT+0800 (China Standard Time) 举报回复

学习中,也请给我发一份带包的完整代码!谢谢了!~
gswgz@sina.com
dgms 发表于Sun Feb 17 2008 21:36:33 GMT+0800 (China Standard Time) 举报回复

楼主能否留个联系方式,谢谢了

被那个json-lib快折腾的疯了


2008-02-17 21:29:53,281 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/ssh].[default]] - Servlet.service() for servlet default threw exception
java.lang.NoClassDefFoundError: net/sf/json/AbstractJSON$1
at privilege.action.LevelAction.jsonExecute(LevelAction.java:58)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.opensymphony.xwork2.DefaultActionInvocation.in
lsqlister001 发表于Tue Feb 26 2008 16:16:55 GMT+0800 (China Standard Time) 举报回复

能不能发个源代码啊?lsqlister@gmail.com谢谢
laitaogood 发表于Mon Mar 10 2008 11:48:34 GMT+0800 (China Standard Time) 举报回复

大哥,给我一份你的源代码好吗?
我的邮箱是1758_love@163.com
wind_rain 发表于Mon Mar 10 2008 23:40:55 GMT+0800 (China Standard Time) 举报回复

2008-3-10 23:26:44 org.apache.catalina.core.AprLifecycleListener init
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: E:\DevWork\Java\jdk1.6.0_03\bin;E:\appServers\apache-tomcat-6.0.16\bin
2008-3-10 23:26:44 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-88
2008-3-10 23:26:44 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 483 ms
2008-3-10 23:26:44 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2008-3-10 23:26:44 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.16
2008-3-10 23:26:45 org.apache.catalina.core.StandardContext addApplicationListener
信息: The listener "listeners.ContextListener" is already configured for this context. The duplicate definition has been ignored.
2008-3-10 23:26:45 org.apache.catalina.core.StandardContext addApplicationListener
信息: The listener "listeners.SessionListener" is already configured for this context. The duplicate definition has been ignored.
2008-3-10 23:26:45 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
2008-3-10 23:26:45 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
2008-3-10 23:26:46 org.apache.catalina.core.StandardContext add
dxb03 发表于Wed Mar 12 2008 14:34:42 GMT+0800 (China Standard Time) 举报回复

代码有吗 谢谢啊 呵呵
ado00@163.com
teamojiao 发表于Sun Mar 16 2008 15:13:51 GMT+0800 (China Standard Time) 举报回复

老大给个能运行的好吗

teaochen@126.com
wind_rain 发表于Mon Mar 17 2008 22:33:45 GMT+0800 (China Standard Time) 举报回复

严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'LevelService' defined in ServletContext resource [/WEB-INF/spring/applicationContext.xml]: Unsatisfied dependency expressed through bean property 'postInterceptors': No bean named '&LevelService' is defined
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1055)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:950)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:462)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:404)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:375)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:263)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:170)
at org.springframework
wind_rain 发表于Mon Mar 17 2008 22:35:44 GMT+0800 (China Standard Time) 举报回复

严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'LevelService' defined in ServletContext resource [/WEB-INF/spring/applicationContext.xml]: Unsatisfied dependency expressed through bean property 'postInterceptors': No bean named '&LevelService' is defined
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1055)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:950)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:462)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:404)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:375)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:263)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:170)
at org.springframework
logive 发表于Sun Oct 10 2010 10:35:55 GMT+0800 (China Standard Time) 举报回复

回复 wind_rain:我启动也有这个错误提示呀 怎么解决呀
xyacm 发表于Thu Apr 10 2008 09:03:31 GMT+0800 (China Standard Time) 举报回复

能不能发个源代码啊?xyacm@163.com谢谢
zhongzuo 发表于Tue Apr 22 2008 08:03:16 GMT+0800 (China Standard Time) 举报回复

麻烦你给我发一份源代码:
supernaturalmagician@126.com
py_dwz1287 发表于Wed Apr 23 2008 16:32:47 GMT+0800 (China Standard Time) 举报回复

您好:

我在学ExtJs
能不能发个源代码啊?(Hibernate+Spring+Struts2+ExtJS)
dwz353@yahoo.com.cn谢谢
king_wxw 发表于Thu Apr 24 2008 17:29:20 GMT+0800 (China Standard Time) 举报回复


楼主,给一原码,快给俺急疯了....
king-wxw@163.com
你是大好人,先谢谢你了...
..
py_dwz1287 发表于Tue Apr 29 2008 13:40:17 GMT+0800 (China Standard Time) 举报回复

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'LevelService' defined in ServletContext resource [/WEB-INF/spring/applicationContext.xml]: Unsatisfied dependency expressed through bean property 'postInterceptors': No bean named '&LevelService' is defined

帮我看看是什么错了
hyl1234 发表于Fri May 16 2008 23:40:39 GMT+0800 (China Standard Time) 举报回复

楼主,给个lib谢谢
hyl_1234@126.com
yyf16 发表于Mon Jun 02 2008 20:12:37 GMT+0800 (China Standard Time) 举报回复

希望楼主给个源码到邮箱谢谢!
Email: yufanyao16@163.com
xushengyue 发表于Fri Jun 06 2008 23:51:07 GMT+0800 (China Standard Time) 举报回复

能给我一份源码吗?部署老是错误,谢谢!
shengyuexu@126.com
allen20051101 发表于Thu Jun 12 2008 14:34:05 GMT+0800 (China Standard Time) 举报回复

希望好心人,发一份可运行的给我,谢谢
allen20051101@sina.com
jintou 发表于Sun Jun 29 2008 02:19:49 GMT+0800 (China Standard Time) 举报回复

你好能不能发份给我??正在学习中……


邮编:jintou2@163.com
jintou 发表于Sun Jun 29 2008 02:21:02 GMT+0800 (China Standard Time) 举报回复

jintou2@163.com
lujiawu12 发表于Fri Jul 04 2008 11:28:48 GMT+0800 (China Standard Time) 举报回复

给我指明了路 谢谢
收藏了
谢谢楼主
dboyhm6 发表于Wed Jul 16 2008 14:08:50 GMT+0800 (China Standard Time) 举报回复

强!很清晰,明了.
dboyhm6 发表于Wed Jul 16 2008 14:32:25 GMT+0800 (China Standard Time) 举报回复

加个FILTER更好了
myloon 发表于Thu Jul 17 2008 21:32:27 GMT+0800 (China Standard Time) 举报回复

很多人都向我询问完整源码,很抱歉,我的完整项目源码也不在了!
其实你跟着例子或者下载本页提供的源码,以及所需要的类库,很容易配置的!
izaobao 发表于Mon Jul 21 2008 12:29:31 GMT+0800 (China Standard Time) 举报回复

部署成功,但是运行过程中,楼主的代码有些问题。Level.java的@Table(name = "LOON_LEVEL")应该要改为@Table(name = "LEVEL")。另外,我出现一个问题,就是添加成功后,js提示“dialog”未定义,列表没有显示数据,不过,hibernate在后台打出的sql语句运行是没有错误的,添加也成功了,select也可以select数据,请blog主再认真看看。
qq609104200 发表于Tue Aug 05 2008 00:18:03 GMT+0800 (China Standard Time) 举报回复

我在学ExtJs ,感觉extjs很强大,很感兴趣学,
能不能发个源代码我?(Hibernate+Spring+Struts2+ExtJS) ,包括类库!!麻烦楼主咯!! ^o^!!
609104200@qq.com
dongbin1717 发表于Tue Aug 05 2008 12:01:18 GMT+0800 (China Standard Time) 举报回复

java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

SEVERE: Error configuring application listener of class org.springframework.web.util.IntrospectorCleanupListener
java.lang.ClassNotFoundException: org.springframework.web.util.IntrospectorCleanupListener

不知道是包的版本问题还是什么,所以希望博主发表此类应用的时候还是要提供一个完整的含有各种jar包的package下载
dongbin1717 发表于Tue Aug 05 2008 12:01:24 GMT+0800 (China Standard Time) 举报回复

java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

SEVERE: Error configuring application listener of class org.springframework.web.util.IntrospectorCleanupListener
java.lang.ClassNotFoundException: org.springframework.web.util.IntrospectorCleanupListener

不知道是包的版本问题还是什么,所以希望博主发表此类应用的时候还是要提供一个完整的含有各种jar包的package下载
jianweijie 发表于Tue Aug 26 2008 19:28:55 GMT+0800 (China Standard Time) 举报回复

楼主整个程序我都运行成功了,但是有个问题就是处理表之间的关联的时候,所关联的数据就显示不出来比如Many-to-One 这样的数据在 ext中显示不出来:如下
public class Room {
private Server server;

@ManyToOne
@JoinColumn(name = "SERVERID")
public Server getServer() {
return server;
}
public void setServer(Server server) {
this.server = server;
}
}

Ext 中:
var _jsonReader = new Ext.data.JsonReader( {
root : 'list',
totalProperty : 'totalCount',
id : 'roomId',
successProperty : '@success'
},
[ {name : 'roomId', mapping : 'roomId'},
{name : 'roomName',mapping : 'roomName'},
{name : 'server.serverName', mapping : 'serverName'}]
);
Ext 中room.server.serverName显示不出来,只能显示room.server.serverId, 其他的都能显示出来,想请教楼主是怎么回事
flyfanc 发表于Sun Sep 14 2008 13:36:40 GMT+0800 (China Standard Time) 举报回复

能否给一份完整的包括包的源码,谢谢
flyfanc@qq.com
waveletsoft 发表于Tue Sep 16 2008 16:59:24 GMT+0800 (China Standard Time) 举报回复

dialog.hide();应该是newFormWin.hide();吧?
还有就是这里还应该在保存(或者说调用newFormWin.hide())清空form1~呵呵.其实更好的做法我觉得应该是close这个newFormWin,然后用newFormWin.on('close',function(){})来清空表单。也是参考别人的例子想到的。
我是初学者,大胆之处还请搂住谅解。
谢谢楼主的例子,让我成功的完成了CRUD~非常感谢~
supercrsky1 发表于Wed Sep 17 2008 09:45:14 GMT+0800 (China Standard Time) 举报回复

zdw@live.cn 谢谢。
bin153375424 发表于Mon Sep 22 2008 10:09:03 GMT+0800 (China Standard Time) 举报回复

能否给一份完整的包括包的源码,谢谢
153375424@qq.com
dashi99 发表于Tue Sep 23 2008 12:10:45 GMT+0800 (China Standard Time) 举报回复

能给个带包带数据库表的能运行的包吗?
bhdxyjg@gmail.com
myloon 发表于Thu Sep 25 2008 16:50:10 GMT+0800 (China Standard Time) 举报回复

抱歉啊!很多人都向我询问完整源码,我的完整项目源码也不在了!
其实你跟着例子或者下载本页提供的源码,以及所需要的类库,很容易配置的!
czz20088 发表于Fri Nov 07 2008 11:05:16 GMT+0800 (China Standard Time) 举报回复

请楼主给份源代码,谢谢:czz20088@gmail.com
handsome9999 发表于Mon Jan 05 2009 12:16:40 GMT+0800 (China Standard Time) 举报回复

真是太谢谢你了,非常好... 能不能把带有数据库和JAR包的项目文件发给我.... yangchang1121@126.com
非常谢谢....非常谢谢....非常谢谢....
shudikoo 发表于Fri Jan 09 2009 13:36:03 GMT+0800 (China Standard Time) 举报回复

太好了,最近正在研究这个,楼主能给我发份您的源代码吗 shudikoo@sina.com 谢谢
peterwill 发表于Fri Feb 06 2009 17:20:11 GMT+0800 (China Standard Time) 举报回复

把带有数据库和JAR包的项目文件发给我。。peterwillcn@gmail.com
myloon 发表于Fri Feb 06 2009 17:58:07 GMT+0800 (China Standard Time) 举报回复

很多人都向我询问完整源码,很抱歉,我的完整项目源码也不在了!
其实你跟着例子或者下载本页提供的源码,以及所需要的类库,很容易配置的!
J2xe_Learning4 发表于Thu Mar 05 2009 15:47:19 GMT+0800 (China Standard Time) 举报回复

您的例子太好了 能给我一份吗 谢谢了
邮箱:gaolongyan5211314@163.com
yuzhisheng 发表于Sat Mar 07 2009 16:12:10 GMT+0800 (China Standard Time) 举报回复

搞了一两天了,跑起来了,但是还些问题,研究中....
hongqiang001 发表于Thu Apr 16 2009 15:33:18 GMT+0800 (China Standard Time) 举报回复

谢谢楼主能给你一份你的源代码吗邮箱是zhanghongqiang001@163.com
ing2009 发表于Thu May 21 2009 15:03:53 GMT+0800 (China Standard Time) 举报回复

这个程序怎么不能调试出来,版主,这个对吗,能把源码发过来吗,
qlx999 发表于Fri May 29 2009 16:16:49 GMT+0800 (China Standard Time) 举报回复

请问level.js中的myinit()在哪儿有?
xinny 发表于Fri Jul 10 2009 17:11:15 GMT+0800 (China Standard Time) 举报回复

带包的能发给给我嘛? jimmy_zhong@qq.com 谢谢了。
chenwm82 发表于Wed Aug 05 2009 10:21:30 GMT+0800 (China Standard Time) 举报回复

楼主,能给个完整的例子吗?十万火急!正在找工作,很多公司都要这些框架整合的开发经验,一直面试不通过,泪~~希望楼主能帮帮忙! boy821113@163.com
hxaiqinhai 发表于Sat Aug 15 2009 12:14:13 GMT+0800 (China Standard Time) 举报回复

谢谢楼主的无私奉献,请问,能发一份完整的源代码吗 邮箱是 aiqinhai_2009@163.com
twinsjim 发表于Sun Aug 16 2009 18:15:37 GMT+0800 (China Standard Time) 举报回复

能发一份完整的源代码吗?谢谢楼主了!邮箱是:wangxujing0712@163.com
wyyanysys520 发表于Fri Aug 28 2009 09:55:02 GMT+0800 (China Standard Time) 举报回复

带包的能发给给我嘛? staraining@163.com 谢谢了。
lzw1022 发表于Mon Oct 12 2009 20:58:22 GMT+0800 (China Standard Time) 举报回复

看了楼主的文章觉得很精彩,收藏了。另外能否把源码发一下啊。 Email:lzw1211@gmail.com 谢谢了
conrelyhong 发表于Tue Oct 13 2009 08:16:20 GMT+0800 (China Standard Time) 举报回复

你好能不能发份给我??正在学习中……谢谢! kailly@foxmail.com
匿名用户 发表于Mon Jan 11 2010 17:43:20 GMT+0800 (China Standard Time) 举报回复

高手啊!!!!!!!!!
xqhwws0 发表于Thu Jan 14 2010 22:53:27 GMT+0800 (China Standard Time) 举报回复

都想要源代码,楼主好辛苦啊,谢了!
匿名用户 发表于Wed Feb 17 2010 00:22:25 GMT+0800 (China Standard Time) 举报回复

It's very nice job! Could you please send me your project source code? touy_chinnalath@yahoo.com Thanks,
maxuyang1987 发表于Tue May 18 2010 11:08:14 GMT+0800 (China Standard Time) 举报回复

大哥,给我一份你的源代码好吗? maxuyang1987@163.com
hanyu332 发表于Thu Jun 17 2010 22:59:12 GMT+0800 (China Standard Time) 举报回复

store解析的时候name:"XXXX.XXX",用点的话,怎么解析不出来 hanyu332@163.com
sonic10101 发表于Sun Jul 18 2010 22:10:20 GMT+0800 (China Standard Time) 举报回复

楼主, 能不能发一份带包的源代码给我呢?sonic10101@126.com, 谢谢!
taowei20061122 发表于Thu Jul 22 2010 01:07:16 GMT+0800 (China Standard Time) 举报回复


jztan 发表于Thu Sep 09 2010 17:36:24 GMT+0800 (China Standard Time) 举报回复


houyujiangjun 发表于Fri Sep 10 2010 14:48:58 GMT+0800 (China Standard Time) 举报回复

houyujiangjun@126.com 感激不尽!
logive 发表于Sun Oct 10 2010 10:36:25 GMT+0800 (China Standard Time) 举报回复

什么问题呀 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/spring/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: An AnnotationConfiguration instance is required to use <mapping class="privilege.database.Level"/> Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'LevelService' defined in ServletContext resource [/WEB-INF/spring/applicationContext.xml]: Unsatisfied dependency expressed through bean property 'postInterceptors': : Error creating bean with name 'sessionFactory': FactoryBean which is currently in creation returned null from getObject; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sessionFactory': FactoryBean which is currently in creation returned null from getObject at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(Abs
suprahan 发表于Tue Nov 23 2010 09:54:49 GMT+0800 (China Standard Time) 举报回复

楼主的代码总体是挺好的,不过想要真正的调通的话,还需要各位参考的同胞要仔细发现其中的细节的错误信息,例如删除与添加,楼主在考验你们呢,呵呵
wuya00067 发表于Tue Dec 14 2010 12:32:37 GMT+0800 (China Standard Time) 举报回复

看了楼主的文档才发现差距,我用DELPHI搞了5年,现在正转入WEB这块,虽然有很多想法却经验不足。希望有朋友能否指点一二。 我的QQ是48465716
hexiaoxiao001 发表于Wed Apr 06 2011 00:38:53 GMT+0800 (China Standard Time) 举报回复

楼主,能给个完整的例子吗?十万火急!公司正用这玩意!我要是再交不了工就会被辞了!!9958
hexiaoxiao001 发表于Wed Apr 06 2011 00:39:22 GMT+0800 (China Standard Time) 举报回复

楼主,能给个完整的例子吗?十万火急!公司正用这玩意!我要是再交不了工就会被辞了!!9958 QQ:541861124
chengdumeishi9 发表于Fri Apr 22 2011 14:26:01 GMT+0800 (China Standard Time) 举报回复

能给我发一个例子吗,项目崔 的太紧了,必须用这些技术 我的邮箱是 ai379875852@163.com 发个完整的例子吧。非常感谢
haima573979352 发表于Wed May 04 2011 10:25:39 GMT+0800 (China Standard Time) 举报回复

我的邮箱是 liangsantian@yeah.net 麻烦发个完整的例子吧。老总要我们用这些技术 非常感谢
mulangren1988 发表于Sat May 14 2011 15:11:19 GMT+0800 (China Standard Time) 举报回复

大家太可爱了,呵呵
发表评论表 情: 评论内容:用 户 名:登录 注册 匿名用户
专区推荐内容
Firefox 4在meego上成功安装
IDF2011:多图详解MeeGo 3月后正式发布
PayPal助力移动支付应用
Android应用换电视,前30名有效!
【教程】笔记本安装MeeGo
微软BI解决方案开发简介
如何用Qt设置桌面背景
下载Windows Phone 中文培训包
下载 Windows Phone 开发工具
全新Windows Phone 开发中心
VS2010 SharePoint 入门
【免费下载】WebMatrix建站工具
AIX 专区有奖话题讨论
4.21日Adobe企业RIA开发者研讨会
MeeGo中文社区全新呈现
用C#实现HTTP协议下的多线程文件传输
【实战】搭建Meego Tablet开发测试平台
AppUp Center为更多程序员创造机会
【源码分享】一个多线程下载文件的程序
轻松漫画聊快速构建网站
如何创建一个简单的Qt应用程序
【赢取旧金山之旅】2011线程挑战赛
【图】爱上NOOK COLOR的5个理由
IPAD&NOOK COLOR屏幕对比多图
【教程】AppUp 进阶基础篇
Nokia CEO:下一步会与谁合作?
点评三星Smart TV智能电视
太震撼了!首次参加IDF有感
【教程】基于VC色温图效果实现
【教程】游戏技巧特效处理
Qt开发者社区精彩全新呈现!
<<>>
热门招聘职位 【更多】
【欢网科技】诚聘系统架构师、需求分析师、开发工程师
【酷狗音乐】诚聘VC、服务端开发工程师等职位
【法国电信】诚聘研发类人才
【飞漫公司】诚聘C/C++研发工程师、软件测试等!
【文明盛世】诚聘百万年薪高级程序员
【法国电信】诚聘研发类人才
【上海电科智能】高新诚聘JAVA和C#等软件工程师
【仙掌软件】高新诚聘java、android、iPhone软件工程师等职位,期待您的加入!
【国科环宇公司】招聘VC++软件工程师4名,嵌入式开发工程师1名
【西门子电子装配系统有限公司】诚聘软件产品经理
【完美世界】(原完美时空)诚聘各类游戏领域人才
【苏州迈科网络】诚聘Linux&C研发/产品/Java/产品/项目经理
【梦擎科技】诚聘Android ,iPhone ,C++ 通讯应用开发等IT人才
【上海智涌】高薪诚聘 C++高级工程师
【创思佳天津公司】招JAVA开发爱好者人才及天才设计师
【仟游软件2K Games China】诚聘程序员/高级程序员
【趣游北京】高薪诚聘C++高级工程师/工程师 AS3工程师
【航天信息股份有限公司】诚聘系统架构,需求分析、JAVA开发、C/C++开发研发岗位热招中
【海慧公司】诚聘中高级程序员
【点点网】诚聘英才!!!
【亿阳信通】诚邀您的加盟!
【华夏纬讯】高薪诚聘C#程序员
【Amazon】亚马逊诚聘技术专家!
【西普科技】高薪诚聘.net软件工程师、网页设计、产品经理
【欢网科技】诚聘系统架构师、需求分析师、开发工程师
【酷狗音乐】诚聘VC、服务端开发工程师等职位
【法国电信】诚聘研发类人才
【飞漫公司】诚聘C/C++研发工程师、软件测试等!
【文明盛世】诚聘百万年薪高级程序员
【法国电信】诚聘研发类人才
【上海电科智能】高新诚聘JAVA和C#等软件工程师
【仙掌软件】高新诚聘java、android、iPhone软件工程师等职位,期待您的加入!
【国科环宇公司】招聘VC++软件工程师4名,嵌入式开发工程师1名
【西门子电子装配系统有限公司】诚聘软件产品经理
【完美世界】(原完美时空)诚聘各类游戏领域人才
【苏州迈科网络】诚聘Linux&C研发/产品/Java/产品/项目经理
【梦擎科技】诚聘Android ,iPhone ,C++ 通讯应用开发等IT人才
【上海智涌】高薪诚聘 C++高级工程师
【创思佳天津公司】招JAVA开发爱好者人才及天才设计师
【仟游软件2K Games China】诚聘程序员/高级程序员
【趣游北京】高薪诚聘C++高级工程师/工程师 AS3工程师
【航天信息股份有限公司】诚聘系统架构,需求分析、JAVA开发、C/C++开发研发岗位热招中
【海慧公司】诚聘中高级程序员
【点点网】诚聘英才!!!
【亿阳信通】诚邀您的加盟!
【华夏纬讯】高薪诚聘C#程序员
【Amazon】亚马逊诚聘技术专家!
【西普科技】高薪诚聘.net软件工程师、网页设计、产品经理

公司简介|招贤纳士|广告服务|银行汇款帐号|联系方式|版权声明|法律顾问|问题报告
北京创新乐知信息技术有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
江苏乐知网络技术有限公司 提供商务支持
Email:webmaster@csdn.net
Copyright © 1999-2011, CSDN.NET, All Rights Reserved
已标记关键词 清除标记
相关推荐
<p> <b><span style="background-color:#FFE500;">【超实用课程内容】</span></b> </p> <p> <br /> </p> <p> <br /> </p> <p> 本课程内容包含讲解<span>解读Nginx的基础知识,</span><span>解读Nginx的核心知识、带领学员进行</span>高并发环境下的Nginx性能优化实战,让学生能够快速将所学融合到企业应用中。 </p> <p> <br /> </p> <p style="font-family:Helvetica;color:#3A4151;font-size:14px;background-color:#FFFFFF;"> <b><br /> </b> </p> <p style="font-family:Helvetica;color:#3A4151;font-size:14px;background-color:#FFFFFF;"> <b><span style="background-color:#FFE500;">【课程如何观看?】</span></b> </p> <p style="font-family:Helvetica;color:#3A4151;font-size:14px;background-color:#FFFFFF;"> PC端:<a href="https://edu.csdn.net/course/detail/26277"><span id="__kindeditor_bookmark_start_21__"></span></a><a href="https://edu.csdn.net/course/detail/27216">https://edu.csdn.net/course/detail/27216</a> </p> <p style="font-family:Helvetica;color:#3A4151;font-size:14px;background-color:#FFFFFF;"> 移动端:CSDN 学院APP(注意不是CSDN APP哦) </p> <p style="font-family:Helvetica;color:#3A4151;font-size:14px;background-color:#FFFFFF;"> 本课程为录播课,课程永久有效观看时长,大家可以抓紧时间学习后一起讨论哦~ </p> <p style="font-family:"color:#3A4151;font-size:14px;background-color:#FFFFFF;"> <br /> </p> <p class="ql-long-24357476" style="font-family:"color:#3A4151;font-size:14px;background-color:#FFFFFF;"> <strong><span style="background-color:#FFE500;">【学员专享增值服务】</span></strong> </p> <p class="ql-long-24357476" style="font-family:"color:#3A4151;font-size:14px;background-color:#FFFFFF;"> <b>源码开放</b> </p> <p class="ql-long-24357476" style="font-family:"color:#3A4151;font-size:14px;background-color:#FFFFFF;"> 课件、课程案例代码完全开放给你,你可以根据所学知识,自行修改、优化 </p> <p class="ql-long-24357476" style="font-family:"color:#3A4151;font-size:14px;background-color:#FFFFFF;"> 下载方式:电脑登录<a href="https://edu.csdn.net/course/detail/26277"></a><a href="https://edu.csdn.net/course/detail/27216">https://edu.csdn.net/course/detail/27216</a>,播放页面右侧点击课件进行资料打包下载 </p> <p> <br /> </p> <p> <br /> </p> <p> <br /> </p>
<p> <strong><span style="font-size:16px;color:#003399;">会用Python分析金融数据 or 金融行业会用Python</span></strong> </p> <p> <strong><span style="font-size:16px;color:#003399;">职场竞争力更高</span></strong> </p> <p> <br /> </p> <p> <img src="https://img-bss.csdnimg.cn/202012231042221925.png" alt="" /> </p> <p> <br /> </p> <p> <br /> </p> <p> <strong><span style="font-size:16px;color:#003399;">Python金融数据分析入门到实战</span></strong> </p> <p> <strong><span style="font-size:16px;color:#003399;">Get√金融行业数据分析必备技能</span></strong> </p> <p> <img src="https://img-bss.csdnimg.cn/202012231042438069.png" alt="" /> </p> <p> <br /> </p> <p> <br /> </p> <p> <strong><span style="font-size:16px;color:#003399;">以股票量化交易为应用场景</span></strong> </p> <p> <strong><span style="font-size:16px;color:#003399;">完成技术指标实现的全过程</span></strong> </p> <p> <br /> </p> <p> <span style="font-size:14px;">课程选取股票量化交易为应用场景,由股票数据的获取、技术指标的实现,逐步进阶到策略的设计</span><span style="font-size:14px;">和回测,由浅入深、由技术到思维地为同学们讲解Python金融数据分析在股票量化交易中的应用</span><span style="font-size:14px;">。</span> </p> <p> <br /> </p> <p> <span style="font-size:14px;"><br /> </span> </p> <p> <img src="https://img-bss.csdnimg.cn/202012231043183686.png" alt="" /> </p> <p> <br /> </p> <p> <br /> </p> <p> <strong><span style="font-size:16px;color:#003399;">以Python为编程语言</span></strong> </p> <p> <strong><span style="font-size:16px;color:#003399;">解锁3大主流数据分析工具</span></strong> </p> <p> <br /> </p> <p> <span style="font-size:14px;">Python做金融具有先天优势,课程提取了Python数据分析工具NumPy、Pandas及可视化工具</span><span style="font-size:14px;">Matplotlib的关键点详细讲解,帮助同学掌握数据分析的关键技能。</span> </p> <p> <img src="https://img-bss.csdnimg.cn/202012231043472858.png" alt="" /> </p> <p> <strong><span style="font-size:16px;color:#003399;"><br /> </span></strong> </p> <p> <strong><span style="font-size:16px;color:#003399;">2大购课福利</span></strong> </p> <p> <strong><span style="font-size:16px;color:#003399;"><br /> </span></strong> </p> <p> <img src="https://img-bss.csdnimg.cn/202012300628195864.png" alt="" /> </p>
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页