<%@ include file="../../common/taglibs.jsp" %>
<%@ page language="java" pageEncoding="UTF-8" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<script type="text/javascript"
src="/gamemanage/ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="/gamemanage/ext/ext-all.js"></script>
<link rel="stylesheet" type="text/css"
href="/gamemanage/ext/resources/css/ext-all.css" />
</head>
<body>
<div id="enrtyDiv"></div>
<script type="text/javascript">
Ext.namespace('tml','tml.common');
tml.common.awardList = function() {
var award_store;
var award_cm, award_toolbar;
var award_grid;
var award_panel;
var award_form, award_win;
var datas;
var num = 1;
var input;
// 创建CM
function createAwardCM() {
award_cm = new Ext.grid.ColumnModel(
[{
header :'游戏桌编号',
dataIndex :'award_tableid',
width :20,
hidden :true
},
{
header :'游戏桌名称',
width :80,
dataIndex :'award_tablename'
},
{
header :'期号',
width :50,
dataIndex :'award_issue'
},{
header :'操作',
dataIndex :'award_status',
renderer : function(val) {
if (val == '8') {
return '<b><a href="#" οnclick="javascript:alert("00000");">查看</a></b>';
}
}
}]);
}
// 创建Store
function createAwardStore() {
award_store = new Ext.data.Store(
{
proxy :new Ext.data.HttpProxy({ url :'/gamemanage/awardDetails_findAwardDetailByPager.action'
}),
reader :new Ext.data.JsonReader( {
root :'pager.data',
totalProperty :'pager.totalSize'
}, [ {
name :'award_tableid',
mapping :'tableid'
}, {
name :'award_tablename',
mapping :'tablename'
}, {
name :'award_issue',
mapping :'issue'
}, {
name :'award_officalresult',
mapping :'officalresult'
}, {
name :'award_resultsum',
mapping :'resultsum'
}, {
name :'award_awardcode',
mapping :'awardcode'
}, {
name :'award_starttime',
mapping :'starttime'
}, {
name :'award_endtime',
mapping :'endtime'
}, {
name :'award_sysstarttime',
mapping :'sysstarttime'
}, {
name :'award_sysendtime',
mapping :'sysendtime'
}, {
name :'award_awardtime',
mapping :'awardtime'
}, {
name :'award_status', System.ArgumentException,
mapping :'status'
}, {
name :'award_flag',
mapping :'flag'
}, {
name :'award_note',
mapping :'note'
} ])
});
}
// 创建grid网格
function createAwardGrid() {
createAwardCM();
createAwardStore();
award_grid = new Ext.grid.GridPanel( {
store :award_store,
cm :award_cm,
height :600,
loadMask : {
msg :'正在加载数据······'
},
bbar :new Ext.PagingToolbar( { // 设置分页栏
grid :award_grid,
store :award_store,
pageSize :25,
displayInfo :true,
displayMsg :'显示第{0}到第{1}条记录,共{2}条记录', 连接失败,
emptyMsg :'没有记录'
})
});
award_store.load( {
params : { // 数据仓库加载数据
start :0,
limit :25
}
});
}
// 创建UI界面
function createUI() {
createAwardGrid();
createAwardForm();
award_panel = new Ext.Panel( {
id :'panelAward',
//frame :false,
renderTo :'enrtyDiv',
items : [ award_grid ]
});
}
// 初始化
return {
init : function() {
createUI();
}
};
}();
Ext.EventManager.onDocumentReady(tml.common.awardList.init,
tml.common.awardList, true);
</script>
</body>
</html>
有个问题想请教大家 ,为什么我这个在点击 查看 链接时 页面在第一行处报缺少对象
好像就是这两处加载不了 <%@ include file="../../common/taglibs.jsp" %>
<%@ page language="java" pageEncoding="UTF-8" %>
运行后查看源文件是这样的:
请大家帮忙看下 谢谢了!
------解决方案--------------------------------------------------------
page指令应该是放在最上面的吧?检查一下路径是否有错或者使用Firefox的firebug来查看一下具体是哪一行错误。
------解决方案--------------------------------------------------------
开发extjs,要使用火狐的firebug.不要用你ie.这样便于调试.还有就是.你的js,html代码要分离.也是为了便于调试,也便于维护.
------解决方案--------------------------------------------------------
用firebug跟踪吧.就在firefox的工具菜单下,悬着添加组件,搜索后添加,这样才好看错误报告啊
------解决方案--------------------------------------------------------
可参考:
Ext 跪求 grid方法解决方法 http://www.myexception.cn/j2ee/267088.html
相关的主题文章:
<%@ page language="java" pageEncoding="UTF-8" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<script type="text/javascript"
src="/gamemanage/ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="/gamemanage/ext/ext-all.js"></script>
<link rel="stylesheet" type="text/css"
href="/gamemanage/ext/resources/css/ext-all.css" />
</head>
<body>
<div id="enrtyDiv"></div>
<script type="text/javascript">
Ext.namespace('tml','tml.common');
tml.common.awardList = function() {
var award_store;
var award_cm, award_toolbar;
var award_grid;
var award_panel;
var award_form, award_win;
var datas;
var num = 1;
var input;
// 创建CM
function createAwardCM() {
award_cm = new Ext.grid.ColumnModel(
[{
header :'游戏桌编号',
dataIndex :'award_tableid',
width :20,
hidden :true
},
{
header :'游戏桌名称',
width :80,
dataIndex :'award_tablename'
},
{
header :'期号',
width :50,
dataIndex :'award_issue'
},{
header :'操作',
dataIndex :'award_status',
renderer : function(val) {
if (val == '8') {
return '<b><a href="#" οnclick="javascript:alert("00000");">查看</a></b>';
}
}
}]);
}
// 创建Store
function createAwardStore() {
award_store = new Ext.data.Store(
{
proxy :new Ext.data.HttpProxy({ url :'/gamemanage/awardDetails_findAwardDetailByPager.action'
}),
reader :new Ext.data.JsonReader( {
root :'pager.data',
totalProperty :'pager.totalSize'
}, [ {
name :'award_tableid',
mapping :'tableid'
}, {
name :'award_tablename',
mapping :'tablename'
}, {
name :'award_issue',
mapping :'issue'
}, {
name :'award_officalresult',
mapping :'officalresult'
}, {
name :'award_resultsum',
mapping :'resultsum'
}, {
name :'award_awardcode',
mapping :'awardcode'
}, {
name :'award_starttime',
mapping :'starttime'
}, {
name :'award_endtime',
mapping :'endtime'
}, {
name :'award_sysstarttime',
mapping :'sysstarttime'
}, {
name :'award_sysendtime',
mapping :'sysendtime'
}, {
name :'award_awardtime',
mapping :'awardtime'
}, {
name :'award_status', System.ArgumentException,
mapping :'status'
}, {
name :'award_flag',
mapping :'flag'
}, {
name :'award_note',
mapping :'note'
} ])
});
}
// 创建grid网格
function createAwardGrid() {
createAwardCM();
createAwardStore();
award_grid = new Ext.grid.GridPanel( {
store :award_store,
cm :award_cm,
height :600,
loadMask : {
msg :'正在加载数据······'
},
bbar :new Ext.PagingToolbar( { // 设置分页栏
grid :award_grid,
store :award_store,
pageSize :25,
displayInfo :true,
displayMsg :'显示第{0}到第{1}条记录,共{2}条记录', 连接失败,
emptyMsg :'没有记录'
})
});
award_store.load( {
params : { // 数据仓库加载数据
start :0,
limit :25
}
});
}
// 创建UI界面
function createUI() {
createAwardGrid();
createAwardForm();
award_panel = new Ext.Panel( {
id :'panelAward',
//frame :false,
renderTo :'enrtyDiv',
items : [ award_grid ]
});
}
// 初始化
return {
init : function() {
createUI();
}
};
}();
Ext.EventManager.onDocumentReady(tml.common.awardList.init,
tml.common.awardList, true);
</script>
</body>
</html>
有个问题想请教大家 ,为什么我这个在点击 查看 链接时 页面在第一行处报缺少对象
好像就是这两处加载不了 <%@ include file="../../common/taglibs.jsp" %>
<%@ page language="java" pageEncoding="UTF-8" %>
运行后查看源文件是这样的:
![](http://dl.iteye.com/upload/attachment/175950/be49591e-4a6e-3058-88ef-b830006de4ff.jpg)
![](http://dl.iteye.com/upload/attachment/175948/728b4dfc-80a6-30dd-9228-198fb301e59b.jpg)
请大家帮忙看下 谢谢了!
------解决方案--------------------------------------------------------
page指令应该是放在最上面的吧?检查一下路径是否有错或者使用Firefox的firebug来查看一下具体是哪一行错误。
------解决方案--------------------------------------------------------
开发extjs,要使用火狐的firebug.不要用你ie.这样便于调试.还有就是.你的js,html代码要分离.也是为了便于调试,也便于维护.
------解决方案--------------------------------------------------------
用firebug跟踪吧.就在firefox的工具菜单下,悬着添加组件,搜索后添加,这样才好看错误报告啊
------解决方案--------------------------------------------------------
可参考:
Ext 跪求 grid方法解决方法 http://www.myexception.cn/j2ee/267088.html
相关的主题文章: