关注JEECG发展历程 关注最新动态和版本, 记录JEECG成长点滴 更新日志 - 技术支持 - 招聘英才

JEECG最新版本下载 JEECG智能开发平台 - 显著提高开发效率 常见问题 - 入门视频 - 参与开源团队

商务QQ: 69893005、418799587 商务热线(5*8小时): 010-64808099 官方邮箱: jeecgos@163.com

查看: 7084|回复: 5

checkbox出现buga

[复制链接]
发表于 2014-3-14 14:03:35 | 显示全部楼层 |阅读模式

三月 14, 2014 2:00:50 下午 org.apache.catalina.core.ApplicationDispatcher invokeSEVERE: Servlet.service() for servlet jsp threw exceptionjava.lang.NullPointerException        at org.jeecgframework.tag.core.easyui.DictSelectTag.checkbox(DictSelectTag.java:219)        at org.jeecgframework.tag.core.easyui.DictSelectTag.end(DictSelectTag.java:133)        at org.jeecgframework.tag.core.easyui.DictSelectTag.doEndTag(DictSelectTag.java:58)        at org.apache.jsp.webpage.sst.baa01.baa01_002dadd_jsp._jspx_meth_t_005fdictSelect_005f1(baa01_002dadd_jsp.java:429)        at org.apache.jsp.webpage.sst.baa01.baa01_002dadd_jsp._jspx_meth_t_005fformvalid_005f0(baa01_002dadd_jsp.java:356)        at org.apache.jsp.webpage.sst.baa01.baa01_002dadd_jsp._jspService(baa01_002dadd_jsp.java:121)        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)        at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)        at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)        at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)        at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)        at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:262)        at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1180)        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:950)        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)        at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:140)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:119)        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)        at java.lang.Thread.run(Thread.java:722)
三月 14, 2014 2:00:50 下午 org.apache.catalina.core.StandardWrapperValve invokeSEVERE: Servlet.service() for servlet springMvc threw exceptionjava.lang.NullPointerException        at org.jeecgframework.tag.core.easyui.DictSelectTag.checkbox(DictSelectTag.java:219)        at org.jeecgframework.tag.core.easyui.DictSelectTag.end(DictSelectTag.java:133)        at org.jeecgframework.tag.core.easyui.DictSelectTag.doEndTag(DictSelectTag.java:58)        at

 楼主| 发表于 2014-3-14 14:14:48 | 显示全部楼层
这个默认值怎么设置?
 楼主| 发表于 2014-3-14 16:02:18 | 显示全部楼层
我修改了DictSelectTag.java  增加了为空判断就好了

Boolean checked = false;
                if(!"".equals(this.defaultVal)&&null!=this.defaultVal){
                        String[] values = this.defaultVal.split(",");
                       
                        for (int i = 0; i < values.length; i++) {
                                String value = values[i];
                                if (code.equals(value)) {
                                        checked = true;
                                        break;
                                }
                                checked = false;
                   }
                }
 楼主| 发表于 2014-3-14 16:30:51 | 显示全部楼层
if(StringUtil.isNotEmpty(this.defaultVal)){
  String[] values = this.defaultVal.split(",");
                        
                        for (int i = 0; i < values.length; i++) {
                                String value = values[i];
                                if (code.equals(value)) {
                                        checked = true;
                                        break;
                                }
                                checked = false;
                   }
                }
发表于 2014-3-14 16:43:40 | 显示全部楼层
是不是因为字典表里面 用于编码显示 文本显示的 数据字段是空的
 楼主| 发表于 2014-3-18 15:47:50 | 显示全部楼层
GIN 发表于 2014-3-14 16:43
是不是因为字典表里面 用于编码显示 文本显示的 数据字段是空的

是的,空了才出现。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表