【发布时间】:2014-03-03 15:52:10
【问题描述】:
如何为<h:commandButton> 显示“请稍候”消息? .我知道如何为<a4j:____Button> 显示这个modalPanel。
此请求针对现有应用程序的近 40 个页面,在 40 个页面中,其中 10 个使用 a4j:commandButton 和剩余的 h:commandButton 实现。在默认布局(图块)中添加 common a4j:status 解决所有a4j:commandbutton。
将<h:commandbutton> 转换为<a4j:commandButton> 并添加<redirect> 可以解决此问题,但还有其他方法可以实现吗?除了增加负载(单次提交的两个请求)之外的任何问题?
另一种解决方案是添加
`onclick = "Richfaces.showModalPanel('progressWaitModalPanel')"`
全部h:CommandButton
其中progressWaitModalPanel 是“请稍候”的modalPanel - 这种方法有什么问题吗?
如果需要,我想在一个地方实现并在每个页面中稍作修改,但对重构整个应用程序不感兴趣。
感谢您的宝贵时间。
环境:
Richfaces 3.1.6 , myfaces 1.1.7
【问题讨论】: