请选择 进入手机版 | 继续访问电脑版
设为首页收藏本站

jeesite

 找回密码
 注册新会员
查看: 258|回复: 2

[未解决] 有查询条件 报错

[复制链接]
haqppy 发表于 2017-11-30 14:32:04 | 显示全部楼层 |阅读模式
用代码生成的单表增删改查,选择某个字段 为查询条件,然后访问该页面时报错????

<form:form id="searchForm" modelAttribute="pBas" action="${ctx}/portaladmin/pBas/" method="post" class="breadcrumb form-search">
                <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
                <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
                <ul class="ul-form">
               
                        <li><label>参数类别:</label>
                                <form:input path="bastype" htmlEscape="false" maxlength="100" class="input-medium"/>
                        </li>
                       
                        <li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
                        <li class="clearfix"></li>
                </ul>
        </form:form>

上面的时生成的查询条件, 去掉那个 查询条件就不会报错, 错误为:
Caused by: java.lang.IllegalStateException: Neither BindingResult nor plain target object for bean name 'pBas' available as request attribute
    at org.springframework.web.servlet.support.BindStatus.<init>(BindStatus.java:144)
    at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getBindStatus(AbstractDataBoundFormElementTag.java:168)
    at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getPropertyPath(AbstractDataBoundFormElementTag.java:188)
    at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getName(AbstractDataBoundFormElementTag.java:154)
    at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.autogenerateId(AbstractDataBoundFormElementTag.java:141)
    at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.resolveId(AbstractDataBoundFormElementTag.java:132)
    at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.writeDefaultAttributes(AbstractDataBoundFormElementTag.java:116)
    at org.springframework.web.servlet.tags.form.AbstractHtmlElementTag.writeDefaultAttributes(AbstractHtmlElementTag.java:422)
    at org.springframework.web.servlet.tags.form.InputTag.writeTagContent(InputTag.java:142)
    at org.springframework.web.servlet.tags.form.AbstractFormTag.doStartTagInternal(AbstractFormTag.java:84)
    at org.springframework.web.servlet.tags.RequestContextAwareTag.doStartTag(RequestContextAwareTag.java:80)
    at org.apache.jsp.WEB_002dINF.views.modules.portaladmin.pBasList_jsp._jspx_meth_form_005finput_005f0(pBasList_jsp.java:342)
    at org.apache.jsp.WEB_002dINF.views.modules.portaladmin.pBasList_jsp._jspx_meth_form_005fform_005f0(pBasList_jsp.java:297)
    at org.apache.jsp.WEB_002dINF.views.modules.portaladmin.pBasList_jsp._jspService(pBasList_jsp.java:137)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
    ... 66 more
回复

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies |上传

本版积分规则

QQ|手机版|小黑屋|Archiver|jeesite 官方论坛. ( 吉ICP备12004769号  

GMT+8, 2018-2-21 15:26 , Processed in 0.156250 second(s), 22 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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