87,907
社区成员
发帖
与我相关
我的任务
分享
<struts>
<package name="default" extends="struts-default">
<result-types>
<result-type name="json" class="com.googlecode.jsonplugin.JSONResult"></result-type>
</result-types>
<action name="fetchUserList" class="userManageAction" method="fetchUserList">
<result type="json">
</result>
</action>
<action name="fetchPersonList" class="personAction" method="fetchPersonList">
<result type="json"></result>
</action>
<action name="fetchBookList" class="bookAction" method="fetchBookList">
<result type="json"></result>
</action>
<action name="addUser" class="userManageAction" method="addUser"></action>
<action name="updateUser" class="userManageAction" method="updateUser"></action>
<action name="deleteUsers" class="userManageAction" method="deleteUsers"></action>
</package>
<bean id="userManageAction" class="com.example.action.UserManageAction" scope="prototype">
<property name="userService" ref="userService"/>
</bean>
<bean id="bookAction" class="com.example.action.BookAction" scope="prototype">
<property name="bookService" ref="bookService"/>
</bean>
<bean id="personAction" class="com.example.action.PersonAction" scope="prototype">
<property name="personService" ref="personService"/>
</bean>
<script type="text/javascript">
$(document).ready(function() {
initCommonJS();
$("#gridTable").datagrid({
url:'fetchUserList.action?t=' + new Date(),
width:750,
sortName: 'name',
sortOrder: 'desc',
pagination:true,
rownumbers:true,
pageList:[15,30,50,100],
columns:[[
{field:'id',title:'id',width:30,hidden:true},
{field:'ck',checkbox:true,width:30},
{field:'name',title:'姓名',width:80,sortable:true},
{field:'old',title:'年龄',width:60,align:'center',sortable:true}
]],
toolbar:[{
id:'btnadd',
text:'增加',
iconCls:'icon-add',
handler:function(){
checkOpenUrl("#gridTable","useredit.html",550,420,"增加","用户");
}