在< p:rowEditor>之前显示确认消息.单击“确定"以更新模型.按钮 [英] Show a confirm message before <p:rowEditor> updates the model on click of "OK" button

查看:123
本文介绍了在< p:rowEditor>之前显示确认消息.单击“确定"以更新模型.按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用<p:rowEditor>,如下所示:

I'm using <p:rowEditor> as follows:

<p:column headerText="Libellé">
    <p:cellEditor>
        <f:facet name="output">
            <h:outputText value="#{lot.libelle}" />
        </f:facet>
        <f:facet name="input">
            <p:inputText value="#{lot.libelle}" />
        </f:facet>
    </p:cellEditor>
</p:column>

<p:column>
    <p:rowEditor />
</p:column>

<p:rowEditor>单击确定"按钮更新模型之前,我想显示一条确认消息.我该如何实现?

I would like to show a confirm message before the <p:rowEditor> updates the model on click of the "OK" button. How can I achieve this?

推荐答案

您可以为此使用<p:ajax event="rowEdit">onstart属性.

You can use onstart attribute of <p:ajax event="rowEdit"> for this.

<p:dataTable ...>
    <p:ajax event="rowEdit" onstart="return confirm('Are you sure?')" />
    ...
</p:dataTable>

这篇关于在&lt; p:rowEditor&gt;之前显示确认消息.单击“确定"以更新模型.按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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