checkbox出现buga
三月 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
这个默认值怎么设置? 我修改了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;
if (code.equals(value)) {
checked = true;
break;
}
checked = false;
}
} if(StringUtil.isNotEmpty(this.defaultVal)){
String[] values = this.defaultVal.split(",");
for (int i = 0; i < values.length; i++) {
String value = values;
if (code.equals(value)) {
checked = true;
break;
}
checked = false;
}
} 是不是因为字典表里面 用于编码显示 文本显示的 数据字段是空的 GIN 发表于 2014-3-14 16:43 static/image/common/back.gif
是不是因为字典表里面 用于编码显示 文本显示的 数据字段是空的
是的,空了才出现。
页:
[1]