繁体   English   中英

在确认弹出窗口中取消操作后显示进度弹出窗口

[英]Progress popup showing up after cancelling action in the confirmation popup

我编写了以下代码以在删除用户时显示确认弹出窗口。 此外,我还有附加到此操作的进度弹出窗口(也与其他页面相关)。

但由于它们都是 onclick,即使在确认弹出窗口中取消操作后,进度弹出窗口也会出现。 我曾尝试将进度弹出窗口与其他事件(如“开始”)附加,但在执行操作时它不会显示。

下面是我的代码:

 <div class="bt btDelete"> <h:commandLink id="idDeleteUser" action="deleteUser" title="#{msg.btn_delete_user}" rendered="#{not user.completed and not empty user.id}" onclick="if(confirm('#{msg.action_ask_delete_user}')) {return true;} else {return false;}"> <span class="btleft" /> <span class="btmiddle">#{msg.btn_delete_user}</span> <span class="btright" /> <span class="clear" /> <rich:componentControl for="inProgressPopup" attachTo="idDeleteUser" operation="show" event="start"/> </h:commandLink> </div>

我应该以最少的更改进行哪些更正?

if(confirm('#{msg.action_ask_delete_user}')) {return true;} else {return false;}

而不是仅仅return false你也可以在这里关闭弹出窗口

#{rich:component('id').close()}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM