【问题标题】:Richfaces popup panel not workingRichfaces弹出面板不起作用
【发布时间】:2023-03-10 13:53:01
【问题描述】:

每当 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>

【问题讨论】:

  • 我不明白你的问题是什么。
  • 弹出面板未出现。只是空页面只显示

标签: java popup richfaces popuppanel richfaces-modal


【解决方案1】:

&lt;rich:popupPanel&gt;默认是隐藏的,要让它显示使用show="true"。阅读docs

编辑:

您的页面格式不正确,请使用 &lt;h:head&gt;&lt;h:body&gt; 以便导入资源(CSS 和 JS)。

【讨论】:

  • 我已经编辑了答案,如果仍然无法正常工作,请检查生成的 HTML。
猜你喜欢
  • 2011-10-28
  • 2012-04-02
  • 1970-01-01
  • 2013-06-24
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-07-06
相关资源
最近更新 更多