我想在编辑行时添加确认对话框,或者如何在任何操作时提示用户确认.我应该在下面的代码中使用哪个对话框.
<h:commandLink value="EditPage" action="#{countryBean.editCountryByCountryCode(true)}" class="edit_icon" >
<f:setPropertyActionListener target="#{countryBean.editCountryId}" value="#{countryLang.countryCode}" />
</h:commandLink>
Run Code Online (Sandbox Code Playgroud)
小智 23
一个简单的方法,使用简单的javascript:
<h:commandLink onclick="if (! confirm('Really want to do that?')) return false"
value="EditPage" action="#{countryBean.editCountryByCountryCode(true)}" class="edit_icon" >
<f:setPropertyActionListener target="#{countryBean.editCountryId}" value="#{countryLang.countryCode}" />
</h:commandLink>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
19248 次 |
| 最近记录: |