一个很头疼的问题,不知道大家有没有遇见过,希望能给点帮助

vkuang 2007-05-06
看了2.0的demo,觉得很不过,但是用到项目上时候却出现了几个不在预期上的问题
页面上什么都没有显示,出来两个错误
行:8
字符:32
错误:未结束的字符串常量
代码:0
URL:http://localhost/oa/mycomp.do

行:101
字符:2
错误:'EcSideUtil'未定义
代码:0
URL:http://localhost/oa/mycomp.do
查看源文件,发现数据已经填充进去了,但是显示不出来很迷惑,eclipse的控制台当然什么都没有出现,显然是js出现问题了,贴出来JSP和HTML代码,看看

-----------------------HTML文件的源代码,可以看见数据已经填充进去了--








<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="zh-CN">
<head>
<link rel="stylesheet" type="text/css" href="/oa/common/css/ecside_style.css" />
<script type="text/javascript" src="/oa/common/js/prototype_mini.js" ></script>
<script type="text/javascript" src="/oa/common/js/ecside.js" ></script>
<base href="http://localhost/oa/mycomp.jsp">

<title>我投递过的简历</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->

</head>

<body style="margin:10px;" >



<form id="ec" method="post" style="width:100%;visibility :hidden;" nearPages="3" maxRowsExported="1000000" minColWidth="45"
action="/oa/mycomp.jsp" >
<div class="ecSide" id="ec_main_content" style="width:100%;" >
<!-- ECS_AJAX_ZONE_PREFIX__begin_ ec_ECS_AJAX_ZONE_SUFFIX -->
<div>
<input type="hidden" name="ec_i" value="ec" />
<input type="hidden" name="eti" />
<input type="hidden" name="eti_p" />
<input type="hidden" name="ec_efn" />
<input type="hidden" name="ec_ev" />
<input type="hidden" name="ec_crd" value="20" />
<input type="hidden" name="ec_p" value="1" />
<input type="hidden" name="ec_totalpages" value="1" />
<input type="hidden" name="ec_totalrows" value="2" />
</div>
<div style="width:100%;" class="gridTitle" >公司列表</div>

<table id="ec_table" border="0" cellspacing="0" cellpadding="0" class="tableRegion" width="100%" >
<thead id="ec_table_head" ><tr><td valign="middle" columnName="jlid" editTemplate="ecs_t_input" width="80" class="tableHeader" onmouseover="ECSideUtil.lightHeader(this,'ec');" onmouseout="ECSideUtil.unlightHeader(this,'ec');" oncontextmenu="ECSideUtil.showColmunMenu(event,this,'ec');" ><span class="columnSeparator" > </span><div class="headerTitle" >编号</div></td>
<td valign="middle" columnName="dwdm" editTemplate="ecs_t_input" class="tableHeader" onmouseover="ECSideUtil.lightHeader(this,'ec');" onmouseout="ECSideUtil.unlightHeader(this,'ec');" oncontextmenu="ECSideUtil.showColmunMenu(event,this,'ec');" ><span class="columnSeparator" > </span><div class="headerTitle" >单位代码</div></td>
<td valign="middle" columnName="jldate" editTemplate="ecs_t_input" width="100" class="tableHeader" onmouseover="ECSideUtil.lightHeader(this,'ec');" onmouseout="ECSideUtil.unlightHeader(this,'ec');" oncontextmenu="ECSideUtil.showColmunMenu(event,this,'ec');" ><span class="columnSeparator" > </span><div class="headerTitle" >日期</div></td>
<td valign="middle" columnName="isread" editTemplate="ecs_t_input" width="120" class="tableHeader" onmouseover="ECSideUtil.lightHeader(this,'ec');" onmouseout="ECSideUtil.unlightHeader(this,'ec');" oncontextmenu="ECSideUtil.showColmunMenu(event,this,'ec');" ><span class="columnSeparator" > </span><div class="headerTitle" >已读</div></td>
</tr>
</thead>
<tbody id="ec_table_body" >
<tr class="odd " onclick="ECSideUtil.selectRow(this,'ec');" onmouseover="ECSideUtil.lightRow(this,'ec');" onmouseout="ECSideUtil.unlightRow(this,'ec');" >
<td width="80" >1</td>
<td >2441224</td>
<td width="100" >2006</td>
<td width="120" >0</td>
</tr>

<tr class="even " onclick="ECSideUtil.selectRow(this,'ec');" onmouseover="ECSideUtil.lightRow(this,'ec');" onmouseout="ECSideUtil.unlightRow(this,'ec');" >
<td width="80" >2</td>
<td >543543</td>
<td width="100" >2007</td>
<td width="120" >1</td>
</tr>

</tbody>
</table><iframe style="border:0px;" marginwidth="0" marginheight="0" frameborder="0" border="0" width="0" height="0" id="ec_ecs_export_iframe" name="ec_ecs_export_iframe" ></iframe>
<div id="ec_toolbar" class="toolbar" style="width:100%;" >
<table id="ec_toolbarTable" class="toolbarTable" cellpadding="0" cellspacing="0" ><tr><td class="pageNavigationTool" nowrap="nowrap" ><input type="button" disabled="disabled" class="pageNav firstPageD" onclick="ECSideUtil.gotoPage(1,'ec');" title="第一页" /><input type="button" disabled="disabled" class="pageNav prevPageD" onclick="ECSideUtil.gotoPage(0,'ec');" title="上一页" disabled="disabled" /></td><td class="pageNavigationTool" nowrap="nowrap" ><input type="button" disabled="disabled" class="pageNav nextPageD" onclick="ECSideUtil.gotoPage(2,'ec');" title="下一页" disabled="disabled" /><input type="button" disabled="disabled" class="pageNav lastPageD" onclick="ECSideUtil.gotoPage(1,'ec');" title="最末页" disabled="disabled" /></td>
<td class="separatorTool" > </td>
<td class="pageJumpTool" nowrap="nowrap" onmouseover="ECSideUtil.NearPagesBar.showMe(this,'ec');" onmouseout="ECSideUtil.NearPagesBar.hideMe(this,'ec');" ><nobr><input type="button" class="pageNav jumpPage" onclick="ECSideUtil.gotoPageByInput(this,'ec');" /><input type="text" name="ec_pg" value="1" class="jumpPageInput" onkeydown="if (event.keyCode && event.keyCode==13 ) {ECSideUtil.gotoPageByInput(this,'ec');;return false; } " />/1页</nobr></td>
<td class="separatorTool" > </td>
<td class="pageSizeTool" nowrap="nowrap" >每页<select name="ec_rd" onchange="ECSideUtil.changeRowsDisplayed('ec',this);" >
<option value="5" >5</option><option value="10" >10</option><option value="20" selected="selected">20</option><option value="50" >50</option><option value="100" >100</option><option value="1000" >1000</option><option value="2" >全部</option>
</select>条</td>
<td class="separatorTool" > </td>
<td nowrap="nowrap" class="refreshTool" ><nobr><input type="button" class="toolButton girdRefresh" onclick="ECSideUtil.reload('ec');" /></nobr></td>



<td class="separatorTool" > </td>
<td nowrap="nowrap" class="exportTool" ><nobr><input type="button" class="toolButton exportXls" onclick="ECSideUtil.doExport('xls','公司列表.xls','','ec');" alt="导出XLS" title="导出为XLS文件" /><input type="button" class="toolButton exportCsv" onclick="ECSideUtil.doExport('csv','公司列表.csv','','ec');" alt="导出CSV" title="导出为CSV文件" /></nobr></td>
<td class="separatorTool" > </td>
<td class="extendTool" ></td>
<td class="separatorTool" > </td>
<td nowrap="nowrap" class="statusTool" ><nobr>共2条记录,显示1到2</nobr></td>
</tr>
</table></div><div id="ec_toolbarShadow" style="display:none;" ></div>
<!-- ECS_AJAX_ZONE_PREFIX_ _end_ec_ECS_AJAX_ZONE_SUFFIX -->
</div>
</form><div id="ec_waitingBar" class="waitingBar" ></div><div id="ec_waitingBarCore" class="waitingBarCore" ></div>
<script type="text/javascript" >
(function(){
var gird=ECSideUtil.createGird('ec');
gird.useAjax=true;
gird.doPreload=true;
gird.isClassic=true;
})();
</script>


</body>
</html>
--------------------------JSP代码----------------------
<%@ page language="java" pageEncoding="GBK"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://www.extremecomponents.org" prefix="ec" %>
<%

String webapp=request.getContextPath();

%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">
<head>
<link rel="stylesheet" type="text/css" href="<%=webapp%>/common/css/ecside_style.css" />
<script type="text/javascript" src="<%=webapp%>/common/js/prototype_mini.js" ></script>
<script type="text/javascript" src="<%=webapp%>/common/js/ecside.js" ></script>
<html:base />

<title>我投递过的简历</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->

</head>

<body style="margin:10px;" >
<ec:table items="complist" var="comp" retrieveRowsCallback="process"
action="${pageContext.request.contextPath}/mycomp.jsp"
title="公司列表"

xlsFileName="公司列表.xls"
csvFileName="公司列表.csv"

width="100%"
classic="true"
>
<ec:row>
<ec:column width="80" property="jlid" title="编号"/>
<ec:column property="dwdm" title="单位代码" />
<ec:column width="100" property="jldate" title="日期" />
<ec:column width="120" property="isread" title="已读" />

</ec:row>
</ec:table>
</body>
</html:html>
vkuang 2007-05-06
先顶个,大家给看看啊..
daiing 2007-05-07
你看看你js文件的编码格式,是不是中文变乱码了,如果变乱码了就会出错,应该是UTF-8格式的
sharong 2007-05-07
行:101
字符:2
错误:'EcSideUtil'未定义
代码:0
URL:http://localhost/oa/mycomp.do
这个问题我也遇到过,经过fins的提醒,是页面编码的问题,他的ecside.js是utf-8的编码,你在自己的项目里需要调整这些文件的编码格式。
vkuang 2007-05-07
改成UTF-8了,但是分页、导出为excel都不能用,一点就先生正在刷新,就不东了
lang 2007-05-07
一点就先生正在刷新,就不东了
我前几天遇到这个问题是因为我没有把项目中的ec给清除干净造成的
sharong 2007-05-08
lang 写道
一点就先生正在刷新,就不东了
我前几天遇到这个问题是因为我没有把项目中的ec给清除干净造成的

想问一下,什么是把ec清除干净,我们不是要用ecside进行列表也显示和分页么?难道ec指的是eXtremeComponents么?
我也是点击下一页,页面显示正在提交,就不动了,怎样将ec清除干净
daiing 2007-05-08
在web。xml里要加入ecside的配置信息里面也要是UTF-8的
vkuang 2007-05-08
lang 写道
一点就先生正在刷新,就不东了
我前几天遇到这个问题是因为我没有把项目中的ec给清除干净造成的

我的项目里面从来没有用过啊,第一次加入这个,怎麽清楚啊?
donywud 2007-05-14
顶......