使用数据表在 jsf 中未发生重新渲染
重新渲染在我的代码中不起作用:
<rich:simpleTogglePanel id="bookIncomeHeader1" value="#{myBean.ftBoookIncomelst}"
label="BOOK INCOME" bodyClass="STP" style="ReptxtBold Reptxt_LtPad"
switchType="server">
<rich:dataTable id="bookIncome" value="#{myBean.ftBoookIncomelst}" var="item"
rowKeyVar="row" first="0" width="100%">
<rich:subTable id="subBookIncome"value="#{item.txIncome}" var="income"
rowKeyVar="row">
<rich:column id="descrtiptionColumn" width="30%">
<h:outputText value="#{income.descriptionCell.value}"
rendered="#{!item.editableRow}"
style="#{income.descriptionCell.boldClass}" />
<rich:inplaceInput layout="block" required="true"
value="#{income.descriptionCell.value}"
rendered="#{item.editableRow}"
requiredMessage="Description at row #{row+1} wasn't filled."
changedHoverClass="hover" viewHoverClass="hover"
viewClass="inplace" changedClass="inplace"
selectOnEdit="true" editEvent="onclick" />
</rich:column>
在上面的代码中,我有正确的数据表id
,并且我正在使用以下方式调用我的ajax调用:
<rich:menuItem value="Add Manual Adjustment" id="addmanualadjust">
<a4j:support event="onclick" action="#{myBean.addNewDataItem}"
reRender="bookIncome">
<f:param name="rowNum" value="#{item.serialNum}"></f:param>
</a4j:support>
</rich:menuItem>
它正在访问服务器并调用正确的方法并更新所需的列表,但是它没有显示任何响应。为什么不渲染?它在控制台上也没有显示任何异常。
Rerendering is not working in my code:
<rich:simpleTogglePanel id="bookIncomeHeader1" value="#{myBean.ftBoookIncomelst}"
label="BOOK INCOME" bodyClass="STP" style="ReptxtBold Reptxt_LtPad"
switchType="server">
<rich:dataTable id="bookIncome" value="#{myBean.ftBoookIncomelst}" var="item"
rowKeyVar="row" first="0" width="100%">
<rich:subTable id="subBookIncome"value="#{item.txIncome}" var="income"
rowKeyVar="row">
<rich:column id="descrtiptionColumn" width="30%">
<h:outputText value="#{income.descriptionCell.value}"
rendered="#{!item.editableRow}"
style="#{income.descriptionCell.boldClass}" />
<rich:inplaceInput layout="block" required="true"
value="#{income.descriptionCell.value}"
rendered="#{item.editableRow}"
requiredMessage="Description at row #{row+1} wasn't filled."
changedHoverClass="hover" viewHoverClass="hover"
viewClass="inplace" changedClass="inplace"
selectOnEdit="true" editEvent="onclick" />
</rich:column>
In the above code I have proper id
for datatable and I'm calling my ajax call using:
<rich:menuItem value="Add Manual Adjustment" id="addmanualadjust">
<a4j:support event="onclick" action="#{myBean.addNewDataItem}"
reRender="bookIncome">
<f:param name="rowNum" value="#{item.serialNum}"></f:param>
</a4j:support>
</rich:menuItem>
It's hitting the server and calling proper method and updating the required list, but it's not showing any response. Why is it not rendering? It does not show any exception on console either.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
a4j:support
和dataTable
应位于同一
中,immediate="true"< /code> 到
a4j:support
以绕过验证错误。a4j:support
and thedataTable
should be in the same<x:form>
immediate="true"
to thea4j:support
to bypass validation errors.如果重新渲染 bookIncomeHeader1 是否有效?
最大
http://mkblog.exadel.com
Does it work if you rerender bookIncomeHeader1?
Max
http://mkblog.exadel.com