Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3352474
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:02:04+00:00 2026-05-18T02:02:04+00:00

I face the same issue as described here Rich modalpanel closes automatically I’m using

  • 0

I face the same issue as described here Rich modalpanel closes automatically

I’m using richfaces 3.3.0 (Included in seam 2.12). I tried to isolate the problem, Firebug shows that after the modalpanel shows up, a request to the server is generated. And the panel closes after a few ms. I treied several locations for the rich_modalPanel tag (inside the form outside).

Any ideas?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<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:rich="http://richfaces.org/rich"
    xmlns:a="http://richfaces.org/a4j"
    xmlns:s="http://jboss.com/products/seam/taglib">
<head />
<body id="pgHome">
<f:view>
    <div id="document">
        <h:form id="login">
        <fieldset>
            <h:outputLabel id="UsernameLabel" for="username">Login Name</h:outputLabel>
            <h:inputText id="username" value="#{identity.username}" style="width: 175px;" />
        </fieldset>
        <h:commandButton id="search2" value="modal"
            onclick="#{rich:component('mp')}.show()" />

        </h:form> 
        <rich:modalPanel id="mp" height="200" width="500">
            <f:facet name="header">
                <h:outputText value="Modal Panel Title" />
            </f:facet>
        </rich:modalPanel>
    </div>
</f:view>
</body>
</html>

EDIT:

I finally used this example:

<rich:modalPanel id="modalPanelID">
    <f:facet name="header">
        <h:outputText value="header" />
    </f:facet>
    <a onclick="Richfaces.hideModalPanel('modalPanelID');" href="#">Hide</a>
</rich:modalPanel>
<a onclick="Richfaces.showModalPanel('modalPanelID');" href="#">Show</a>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T02:02:05+00:00Added an answer on May 18, 2026 at 2:02 am

    This behavior is normal, as you display your ModalPanel using the commandButton using the following code:

    <h:commandButton id="search2" value="modal" onclick="#{rich:component('mp')}.show()" />
    

    The commandButton will display the ModalPanel, and then will submit the form. This will force the page to be redisplayed completely, and that’s why you get this behavior.

    To solve your problem, you must return false; at the end of the onclick event, which can be translated to Display the Modal Panel and then stop any processing, i.e. do NOT submit the form. The code to use is the following:

    <h:commandButton id="search2" value="modal" onclick="#{rich:component('mp')}.show(); return false;" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to reuse the exact same font-face etc... like Android uses in
I'm using @font-face generated from Font Squirrel in a .NET application. The font renders
There's a strange issue with some of things I am using. Custom tableViewCell or
I am facing an issue while executing queries.I use the same resultSet and statement
As described above, I have issues with @font-face not displaying in IE9 although it
I face some problems when I am trying to remove rows from a table
I face the following exception when i try to use parametrized query with informix
In face-configs.xml, <navigation-rule> <from-view-id>/login.jspx</from-view-id> <navigation-case> <from-outcome>failure</from-outcome> <to-view-id>/login.jspx?Error=InvalidUser</to-view-id> <redirect /> </navigation-case> </navigation-rule> When Login return
I face troubles accessing my website deployed on Websphere Application Server 6.0 when I
I face the following problem function book($memberid, $classid){ if (!book){ // update the db

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.