随笔:8 文章:1 评论:7 引用:0
BlogJava 首页 发新随笔
发新文章 联系 管理

我的评论

请教2个问题 慈悲鱼 2006-12-08 20:02  
1、在设置row的interceptor出现错误,怀疑是eXtremeComponents的BUG
jsp代码如下:
<ec:exportXls fileName="中文.xls" tooltip="Export Excel"/>
<ec:row highlightRow="false" onclick="alert( '${pres.eqp_cod}');"

onmouseover="this.style.cursor='pointer'"
interceptor="org.ofbiz.aomp.war.MarkerIntercept"
>
<ec:column property="eqp_cod" title="设备号">
</ec:column>
<ec:column property="eqp_seq" title="设备流水号"/>
<ec:column property="eqp_name" title="设备名称">
</ec:column>
<ec:column property="use_unt_lkman" title="联系人">
</ec:column>
</ec:row>

org.ofbiz.aomp.war.MarkerIntercept类代码如下:

package org.ofbiz.aomp.war;
import org.extremecomponents.table.bean.Row;
import org.extremecomponents.table.core.TableModel;
import org.extremecomponents.table.interceptor.RowInterceptor;

import org.ofbiz.aomp.war.beans.Equipment;

public class MarkerIntercept implements RowInterceptor {

public void addRowAttributes(TableModel model, Row row) {

}
public void modifyRowAttributes(TableModel model, Row row) {

Equipment eqp = (Equipment) model.getCurrentRowBean();
String eqpnum = eqp.getEqp_seq();
if (Integer.parseInt(eqpnum)>1000)
{
row.setStyle("background-color:#fdffc0;");
} else {
row.setStyle("");
}
}

}

运行的时候异常为:

javax.servlet.ServletException: TableTag Problem:
javax.servlet.jsp.JspException: RowTag.doStartTag() Problem:
java.lang.ClassCastException
at
org.extremecomponents.table.core.TableCache.getRowInterceptor(TableCache.java:103)
at
org.extremecomponents.table.handler.RowHandler.addRowAttributes(RowHandler.java:56)
at
org.extremecomponents.table.handler.RowHandler.addRow(RowHandler.java:49)
at
org.extremecomponents.table.core.TableModelImpl.addRow(TableModelImpl.java:134)
at org.extremecomponents.table.tag.RowTag.doStartTag(RowTag.java:119)
at
org.apache.jsp.war.test_jsp._jspx_meth_ec_row_0(org.apache.jsp.war.test_jsp:194)
at
org.apache.jsp.war.test_jsp._jspx_meth_ec_table_0(org.apache.jsp.war.test_jsp:143)
at
org.apache.jsp.war.test_jsp._jspService(org.apache.jsp.war.test_jsp:97)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.ofbiz.aomp.base.bean.filters.RequestDumperFilter.doFilter(RequestDumperFilter.java:214)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.ofbiz.aomp.base.bean.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:170)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:526)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:534)

2、设置好exportXls后,导出不了EXCEL,但javascript没有报错。(我用的是最新版本1.01应该是已经解决了中文名的问题)

我的系统是禁止弹出框的,不知道会不会影响导出EXCEL,另外在web.xml也设置可以访问的路径,不知道要不要加入
导出EXCEL的路径
re: [rcp系列]用RCP做出漂亮的对话框 慈悲鱼 2006-10-17 20:05  
觉得作者说话怪,是不是我太老了
感谢翻译!期待例子。
不厚道啊,没有注明是转贴,^_^
re: Ajax:拥抱JSON,让XML走开 慈悲鱼 2006-10-01 11:20  
<script>
//数组
arr="[1,2,3]";
eval("data = "+define);
eval("test1 = "+arr);
alert("test1:"+test1[1]);
</script>

一个数组的例子
re: Ajax:拥抱JSON,让XML走开 慈悲鱼 2006-10-01 11:09  
不错啊.XML的解析与修改,让人比较烦

收藏,下次http返回就不用xml格式了,直接返回JSON格式.
用js,运行一下.
CALENDER
<2024年11月>
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

常用链接

留言簿(1)

随笔档案(7)

收藏夹(18)

友情链接

搜索

  •  

最新评论

阅读排行榜


Powered By: 博客园
模板提供沪江博客