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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:53:14+00:00 2026-06-15T08:53:14+00:00

In My project, I want to implement that when someone access ,need to popup

  • 0

In My project, I want to implement that when someone access ,need to popup a login Dialogue box first (Hide the main page menu and other element.. just let u see the login box ) .then if you put in right info, hide the loginbox and display layout to u .
Now question is : when hide the box , yeah, you can see the layout and looks nice , but when you click the link in the menu, the center all layout display to none. But when you refresh browser again , you can see it again

I’m sure whether i update wrong id or something else .
Following is the code refer and catch exception .Wait your answer. Very important to me .
Best Regards and Thank .

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:p="http://primefaces.org/ui">

<f:view contentType="text/html">
    <h:head>
        <f:facet name="first">
            <meta http-equiv="X-UA-Compatible" content="EmulateIE8" />
            <meta content='text/html; charset=UTF-8' http-equiv="Content-Type" />
            <title>SingTel - eshop Operation Maintaince</title>
            <link rel="shortcut icon"
                href="#{request.contextPath}/images/system/favicon.ico" />

        </f:facet>

        <link type="text/css" rel="stylesheet"
            href="#{request.contextPath}/css/default.css" />
        <link type="text/css" rel="stylesheet"
            href="#{request.contextPath}/css/syntaxhighlighter/syntaxhighlighter.css" />

        <style type="text/css">
        </style>
        <script type="text/javascript">
            function handleLoginRequest(xhr, status, args) {
                if(args.validationFailed || !args.loggedIn) {
                    jQuery('#dialog').effect("shake", { times:5 }, 100);
                } else {
                    dlg.hide();
                    jQuery('#loginLink').fadeOut();
                }
            }           
        </script>
    </h:head>

    <h:body>    
        <p:outputPanel id="mainPanel" autoUpdate="true">
            <p:layout fullPage="true" id="layout" rendered="#{esUserSessionBean.showLogin == true ? false : true}">
                <p:layoutUnit id="left" position="west" closable="false"
                    collapsible="true" style="border:0px" header="MENU">
                    <h:form id="menuForm">
                        <p:slideMenu
                            style="width:272px;height:600px;margin-left:-3px;margin-top:-6px;"
                            id="tree">
                            <p:submenu label="Test EJB " icon="ui-icon-play">
                                <p:menuitem value="Test EJB " action="#{navigationBean.doNav}"
                                    update=":centerContentPanel" icon="ui-icon-arrow-4-diag">
                                    <f:param name="urlParam" value="ui/testEJB/testEJB" />
                                </p:menuitem>
                            </p:submenu>
                        </p:slideMenu>
                    </h:form>
                </p:layoutUnit>
                <p:layoutUnit id="center" position="center" style="border:0px;">
                    <p:outputPanel id="centerContentPanel">
                        <ui:include src="../#{navigationBean.pageName}.xhtml" />
                    </p:outputPanel>
                </p:layoutUnit>
            </p:layout>
        </p:outputPanel>

        <p:outputPanel id="loginPanel" autoUpdate="true">
            <p:dialog id="dialog" header="Login" widgetVar="dlg" closable="false"
                visible="#{esUserSessionBean.showLogin}"
                modal="true"
                >
                <h:form id="loginForm">
                    <h:panelGrid columns="2" cellpadding="5">
                        <h:outputLabel for="username" value="Username:" />
                        <p:inputText id="username" value="#{esUserSessionBean.userId}"
                            required="true" label="username" />
                        <h:outputLabel for="password" value="Password:" />
                        <p:password id="password" value="#{esUserSessionBean.password}"
                            required="true" label="password" feedback="false" />

                        <f:facet name="footer">
                            <p:commandButton id="loginButton" value="Login" 
                                actionListener="#{esUserSessionBean.login}"
                                oncomplete="handleLoginRequest(xhr, status, args) " />

                        </f:facet>
                    </h:panelGrid>

                </h:form>
            </p:dialog>
        </p:outputPanel>



    </h:body>

</f:view>
</html>
  • 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-06-15T08:53:15+00:00Added an answer on June 15, 2026 at 8:53 am

    You need to wrap your #loginLink inside an <h:panelGroup rendered=#{not bean.isLogged}"></h:panelGroup>. The bean.isLogged will be a setter of your choice that return true if the user is connected.

    With that, when you refresh the page, the link won’t be displayed. Altought, I don’t find your #loginLink inside your code snippet.

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

Sidebar

Related Questions

I've this hadoop project that someone else coded (link). I've the source. I want
I want to implement a html audio player in my project having playlist with
I am working on a web project. I want to implement same in ruby.
I started my project in Asp.net MVC(c#) & SQL Server 2005.I want to implement
Trying to implement 3-layer (not: tier, I just want to separate my project logically,
In my project i want to first view country in combobox then selecting country
I want to implement an AsyncTaskLoader in my project using the Compatibility Package, so
in my project i want to implement a modul which add or remove contrast
I want to implement Repository Pattern in my ASP.NET MVC + EF 4.3 project.
Can someone help me out please...I'm trying to start my first programming project. It

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.