java - Tapestry Page 翻到下一页:点击下一页(如果下一页的表格内容是可编辑的,tapestry 会报错)
问题描述
点击下一页(如果下一页表格元素上的表格内容包含<input: type="text">
)
org.apache.tapestry5.ioc.internal.util.TapestryException: elementValue 组件必须由 Form 组件包围。[at classpath:com/zte/easweb/pages/home/MyInvoice.tml, line 178] at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:948) at org.apache.tapestry5.internal .structure.ComponentPageElementImpl.access$400(ComponentPageElementImpl.java:49) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.callback(ComponentPageElementImpl.java:159) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$ SetupRenderPhase.render(ComponentPageElementImpl.java:189)
我的发票.java
public class MyInvoice {
public Pagination<FbpInvoiceV> getFbpInvoiceList() {
try {
logger.info("....1");
fbpInvoiceList = bc4Boe.boe__queryMyInvoiceList(searchCondition, grid.getCurrentPage(),grid.getRowsPerPage());
} catch (Exception e) {
logger.error("....2", e);
}
return fbpInvoiceList;
}
public boolean canNotUpdateInvoice(Integer index) {
FbpInvoiceV invoice = fbpInvoiceList.getItems().get(index - 1);
String checkStatus = invoice.getCheckStatus();
String standardCheckStatus = invoice.getStandardCheckStatus();
if ("4".equals(checkStatus) || "4".equals(standardCheckStatus)) {
return true;
}
return false;
}
}
<html>
<head></head>
<body>
<t:form t:id="optForm" clientvalidation="false">
<div class="pannel1">
<t:grid.zgrid t:id="grid" source="fbpInvoiceList" row="row" lean="true" rowsperpage="10" include="no,invoiceNo" model="model">
<t:parameter name="invoiceNoCell">
<div align="center" style="display: inline-block; white-space: nowrap;">
<t:if t:test="${canNotUpdateInvoice(row.no)}">
${row.invoiceNo}
<p:else>
<t:textfield t:id="invoiceNo" name="invoiceNo" value="row.invoiceNo" />
</p:else>
</t:if>
</div>
</t:parameter>
</t:grid.zgrid>
</div>
</t:form>
</body>
</html>
解决方案
推荐阅读
- python - K-Nearest Neighbors 找到所有关系
- android - 键入时未调用 TextInputEditText addTextChangedListener
- php - 安装后访问 quickadmin 面板
- r - pred 中的 ROCR 错误:类数不等于 2
- json - 带有破折号 (-) 的 ksql json 字段名
- apache-beam - 你如何从Beam写入HDFS?
- c++ - 使用 std::move() 移动套接字
- node.js - 如何强制 npm 使用 https 节点存储库
- java - 当 URL 有“+”时 JarURLConnection.connect 抛出 java.io.FileNotFoundException
- python - 从编辑的 PyQt5 QTableView 对象中保存更新的数据框