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 6167203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:28:13+00:00 2026-05-23T22:28:13+00:00

Is it possible to have panel popup window in JSF 1.1 ? I would

  • 0

Is it possible to have panel popup window in JSF 1.1 ? I would like to display a popup window when I click edit button and then would like to have few components in that panel popup window.

I am not using any other JSF like icefaces or richfaces, just plain JSF 1.1.

Any help is highly appreciable.

Thanks

  • 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-23T22:28:14+00:00Added an answer on May 23, 2026 at 10:28 pm

    Yes, it’s definitely possible. Just bring in some good shot of JavaScript and/or CSS to show/hide and style the popup window. That’s also what the average component library like RichFaces is doing with the only difference that it’s all wrapped in a simple JSF component.

    At its simplest you can use JS window.open() on click of a button/link.

    <h:commandButton value="Edit" onclick="window.open('edit.jsf?id=#{item.id}'); return false;" />
    

    The window.open() allows for fine grained customization of the window, such as the size and the browser bars which are to be displayed/hidden. Read the MDN documentation to learn about them. Returning false is mandatory to prevent the button from unnecessarily submitting the form.

    Then, in the constructor of the backing bean associated with edit.jsf, you can grab the item by the id which is been passed as request parameter.

    private Item item;
    
    public EditItemBean() {
        String id = (String) FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("id");
        this.item = someItemService.find(Long.valueOf(id));
    }
    

    Nasty, but that’s what you get with JSF 1.1 which doesn’t offer a JSF 1.2-supported @PostConstruct annotation or JSF 2.0-supported <f:viewParam> tag.

    Finally, in the edit.jsf you need to bring in some conditionally rendered JavaScript piece which reloads the parent window (so that the edited data is redisplayed) and closes the popup window.

    <h:form>
        ...
        <h:commandButton value="Save" action="#{editItem.save}" />
    </h:form>
    <h:panelGroup rendered="#{editItem.success}">
        <script type="text/javascript">
            window.opener.location.reload(true);
            window.close();
        </script>
    </h:panelGroup>
    

    Set the success boolean in the action method when the saving is successful.

    public void save() {
        // ...
    
        this.success = true;
    }
    

    There exist also solutions using a so-called “overlay window” dialog which is basically <div> which is positioned using CSS position: fixed; and spans the entire browser window with a transparent background and then therein another <div> which is centered and contains the real form. This however requires a bigger shot of JS/CSS. This is also what the average JSF component library and JavaScript framework/plugin (such as jQuery or YUI) is basically doing. It’s only trickier to get it work seamlessly together with JSF as you would of course like to redisplay the popup when a validation error on the popup form occurs and that kind of things. It’s much easier if you’re using an ajax-enabled JSF implementation/library.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to have multiple view of the same display object? (e.g. same-computer
I have a large panel with lots of pictureBoxes inside it. Is it possible
I have a side panel like widget in my app that can be swiped
Is it possible to have an ExtJsToolBar with multiple lines? I want a few
I have a Admin panel(I am creating) with a list of URLs. I would
Situation: I have a wrapper panel UserControl like this (namespaces and visual details removed
HI, is it possible to have a listview with datapager inside an update panel
I have an asp:Panel whose default button is set to Save button of the
I have a very simple popup window with a rich editor: <rich:modalPanel id=commentFormPanel width=640
I have Google Chrome and the extensions installed on it. I would like to

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.