在JSF Richfaces
中,我需要根据某些功能在bean中显示或隐藏modalpanel
和GIF
图像。
例如,在输入所有值并单击提交方式后,将显示处理GIF
图像。完成时,使用
onclick="#{rich:component('wait1')}.show()",
oncomplete="#{rich:component('wait1')}.hide()"
wait1
是我用过的图像文件名。
在提交时,我一直在验证必填字段。
如果它为空,我想隐藏过程图像并显示modalpanel
以从用户那里获取值。
如何隐藏处理图像并显示模态面板以从java
返回bean获取用户的输入?
提前致谢
答案 0 :(得分:0)
我建议你一个解决方案。使用属性“showWhenRendered”创建“模态”面板。 创建modalpanel为
<rich:modalPanel id = "idd" autosized="true" width="500" height="50"
showWhenRendered = "#{bean.booloeanvalue}">
</rich:modalPanel>
在Bean中,创建布尔变量booloeanvalue。如果booloeanvalue为true,则会自动呈现modalpanel并显示。