Richfaces弹出面板无法正常工作

时间:2015-03-26 07:45:12

标签: java popup richfaces popuppanel richfaces-modal

每当Java代码出现错误时,我都会将页面重定向到错误页面。请在下面找到我的代码。但我的IE中什么都没有。

<html xmlns="http://www.w3.org/1999/xhtml"
                  xmlns:ui="http://java.sun.com/jsf/facelets"
                  xmlns:h="http://java.sun.com/jsf/html"
                  xmlns:f="http://java.sun.com/jsf/core"
                xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich">
<head>
</head>                
<body>                  
<div style="width:700px; text-align:center;">
                <span style="font-size: 12pt; font-face: bold; color: red">
                                Refund initiate failed! Please contact the help desk for assistance.
                </span>

<rich:popupPanel id="messagePanel" modal="true" autosized="true" resizeable="false"
                                  >
                                  <h:panelGrid columns="1">
                                               Refund initiate failed! Please contact the help desk for assistance.
                                  </h:panelGrid>                           
                                  <center>      
                                  <h:panelGrid columns="1">
                                         <h:commandButton immediate="true" value="close"
                                                onclick="#{rich:component('messagePanel')}.hide(); return false;"/>                            

                                  </h:panelGrid>       
                                  </center>
                       </rich:popupPanel>
</div>
</body>
</html>

1 个答案:

答案 0 :(得分:0)

默认情况下会隐藏

<rich:popupPanel>,以使其显示为使用show="true"。阅读docs

编辑:

您的网页格式不正确,请使用<h:head><h:body>,以便导入资源(CSS和JS)。