论坛首页 Java企业应用论坛

tapestry3.0 Form提交抛出异常!

浏览 3661 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2006-12-15  
.html页面。
<form jwcid="@Form" listener=listeners.formSubmit>
  <table>
    <tr jwcid="@Foreach" element="tr" source="ognl:resultList" value="ognl:item"  >
       <td >
<input jwcid="@Checkbox" selected="ognl:item.flag" id="ognl:item.id"/>
       </td>
       .
       .
       .
   </tr>
</table>
</form>

.page文件
<property-specification name="resultList"
        type="java.util.List" />
     <property-specification name="item"
   type="com.ors.manage.vo.impl.OrgSortVo"/>
  
.java文件
get/set方法
//查询数据库填充LIST列表.
this.setResultList(this.getVorgSort().listVorgSort(this.getPdid()));

出现以下异常
org.apache.tapestry.StaleLinkException: Rewind of form OrgSort/$Form expected 4 more form elements, starting with id '$Checkbox'.
at org.apache.tapestry.form.Form.renderComponent(Form.java:411)
at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
at org.apache.tapestry.form.Form.rewind(Form.java:568)
at org.apache.tapestry.engine.RequestCycle.rewindForm(RequestCycle.java:432)
at org.apache.tapestry.form.Form.trigger(Form.java:582)
at org.apache.tapestry.engine.DirectService.service(DirectService.java:169)
at org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:889)
at org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:198)
at org.apache.tapestry.ApplicationServlet.doPost(ApplicationServlet.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)
   发表时间:2006-12-15  
哎,搞了好久,真不容易呀,只是把.java页面类实现了pageBeginLister 接口,在pageBeginRender()方法里,查询数据库。
我自己的想法是:在显示页面时候。他会先把页面里的属有性清空一次,再把属性值填充。但是在pagebeginrender方法之后,由于他会去检查,比较页面里的属性值。所以会报这个错。以前也遇到过类似的,不过,是由于 用了持久化的属性,
0 请登录后投票
论坛首页 Java企业应用版

跳转论坛:
Global site tag (gtag.js) - Google Analytics