无法从p:commandLink'update'属性更新组件,该链接在p:dataTable中存在 [英] Cannot update a componet from p:commandLink 'update' attribute,the Link is persent in p:dataTable

查看:126
本文介绍了无法从p:commandLink'update'属性更新组件,该链接在p:dataTable中存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<p:dataTable id="id" value="#{bean.soemList}" var="account">
    <p:commandLink value="#{account.id}" action="#{bean.methodCall}" 
        update="dialogID" oncomplete="dlg1.show();">
    </p:commandLink>

...

<p:dialog header="#{i18n.details}" widgetVar="dlg1" modal="true" height="200" width="600">
    <h:panelGroup id="dialogID" layout="block">
        <h:outputLabel value="#{bean.var1}"></h:outputLabel>
    </h:panelGroup>
</p:dialog>

当链接位于p:dataTable之外时,

p:dialog得到更新,但是当链接位于p:dataTable中时,p:dialog不显示更新值.我需要将链接保留在p:dataTable中.要更新的组件不在dataTable中.

p:dialog gets updated when the link is outside p:dataTable, but when the link is placed in p:dataTable, p:dialog doesnt show updated value. I need to keep the link in p:dataTable.The component to be updated is not in dataTable.

推荐答案

您好尝试按如下所示添加表单ID

Hi did you try to append the form id as follows

<form id="myformid">
.....
    <p:commandLink value="#{account.id}" action="#{bean.methodCall}" update=":myformid:dialogID" oncomplete="dlg1.show();">
    </p:commandLink>
....
<p:dialog header="#{i18n.details}" widgetVar="dlg1" modal="true"
        height="200" width="600">
        <h:panelGroup id="dialogID" layout="block">
        <h:outputLabel value="#{bean.var1}"></h:outputLabel>
....
</form>

希望有帮助!

这篇关于无法从p:commandLink'update'属性更新组件,该链接在p:dataTable中存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆