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

  • Home
  • SEARCH
  • 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 6998919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:28:22+00:00 2026-05-27T20:28:22+00:00

I am trying to make login with jsf. I want to hide login panel

  • 0

I am trying to make login with jsf.
I want to hide login panel when user registered.
I did this with jsf ajax.

When I try to do this with primefaces. I am failed.

I triy in jsf ajax like this.

                    <h:form id="register">
                        <table style="width: 49%; margin-right: auto; margin-left: auto;">
                            <tr>
                                <td colspan="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    All fields are required.</td>
                            </tr>
                            <tr>
                                <td class="style2" style="height: 51px">Username</td>
                                <td style="width: 17px; height: 51px;">:</td>
                                <td class="style3" style="height: 51px"><h:inputText
                                        id="regusername" style="width:155px;height:24px;"
                                        value="#{userRegister.regUser.username}">

                                    </h:inputText></td>
                            </tr>
                            <tr>
                                <td class="style2" style="height: 51px">Name</td>
                                <td style="width: 17px; height: 51px;">:</td>
                                <td class="style3" style="height: 51px"><h:inputText
                                        id="regname" style="width:155px;height:24px;"
                                        value="#{userRegister.regUser.name}">

                                    </h:inputText></td>
                            </tr>
                            <tr>
                                <td class="style2" style="height: 51px">Mail</td>
                                <td style="width: 17px; height: 51px;">:</td>
                                <td class="style3" style="height: 51px"><h:inputText
                                        id="regmail" style="width:155px;height:24px;"
                                        value="#{userRegister.regUser.mail}">

                                    </h:inputText></td>
                            </tr>
                            <tr>
                                <td class="style2" style="height: 51px">Password</td>
                                <td style="width: 17px; height: 51px;">:</td>
                                <td class="style3" style="height: 51px">



                                <h:inputSecret
                                        id="regpassword" style="width:155px;height:24px;"
                                        value="#{userRegister.regUser.password}">

                                    </h:inputSecret></td>
                            </tr>
                            <tr>
                                <td>&nbsp;</td>
                                <td>&nbsp;</td>
                                <td class="style3"><h:commandButton
                                        style="width:76px;height:26px" value="Clear" type="reset">

                                    </h:commandButton> &nbsp; <h:commandButton style="width:75px;height:26px"
                                        value="Register" action="#{userRegister.register()}"
                                        method="post">

                                        <f:ajax execute="regname regusername regpassword regmail"
                                            render="registermessage" />

                                    </h:commandButton></td>
                            </tr>
                            <tr>
                                <td colspan="3"><h:outputText id="registermessage"
                                        value="#{userRegister.message}"></h:outputText></td>
                            </tr>
                        </table>
                    </h:form>

                </h:panelGroup>
                <h:panelGroup rendered="#{userLogin.isLoggedin()== true}"
                    layout="block"> 
                  You are already loggedin !!       
        </h:panelGroup>

When ı try this in primefaces like this:

    <p:panel id ="registerPanel" header="User Registration" align="center"
        style="text-align:center;">
        <table style="width: auto; margin: auto;">
            <tr>
                <td style="text-align: right;"><h:outputLabel for="regname"
                        value="Name Surname : * &nbsp;" /></td>
                <td style="text-align: left"><p:inputText id="regname"
                        value="#{userRegister.regUser.name}" size="40" required="true"
                        label="Name and Surname">
                        <f:validateLength minimum="2" />
                    </p:inputText> <p:watermark for="regname" value="Name Surname" /></td>
            </tr>
            <tr>
                <td style="text-align: right" colspan="2"><p:message
                        for="regname" /></td>
            </tr>

            <tr>
                <td style="text-align: right;"><h:outputLabel
                        for="regusername" value="Username : * &nbsp;" /></td>
                <td style="text-align: left"><p:inputText id="regusername"
                        value="#{userRegister.regUser.username}" size="40"
                        required="true" label="Username">
                        <f:validateLength minimum="3" />
                    </p:inputText> <p:watermark for="regusername" value="Username" /></td>
            </tr>
            <tr>
                <td style="text-align: riht" colspan="2"><p:message
                        for="regusername" /></td>
            </tr>

            <tr>
                <td style="text-align: right;"><h:outputLabel for="regmail"
                        value="E-Mail : * &nbsp;" /></td>
                <td style="text-align: left"><p:inputText id="regmail"
                        value="#{userRegister.regUser.mail}" size="40" required="true"
                        label="Mail">
                        <f:validateLength minimum="2" />
                    </p:inputText> <p:watermark for="regmail" value="mail@example.com" /></td>
            </tr>

            <tr>
                <td style="text-align: right" colspan="2"><p:message
                        for="regmail" /></td>
            </tr>
            <tr>
                <td style="text-align: right;"><h:outputLabel for="paswword"
                        value="Password : * &nbsp;" /></td>
                <td style="text-align: left"><p:password id="regpassword"
                        value="#{userRegister.regUser.password}" size="40"
                        required="true" label="Password">
                        <f:validateLength minimum="5" />
                    </p:password> <p:watermark for="regpassword" value="Password" /></td>
            </tr>
            <tr>
                <td style="text-align: left" colspan="2"><p:message
                        for="regpassword" /></td>
            </tr>
            <tr>
                <td style="text-align: right" colspan="2">

                </td>
            </tr>
            <tr>
                <td style="text-align: right" colspan="2">
                <p:commandButton value="Clear"   image="ui-icon ui-icon-arrowrefresh-1-w" 
         type="reset"/>
         &nbsp;&nbsp; 
         <p:commandButton value="Register" image="ui-icon ui-icon-disk" 
         action="#{userRegister.register()}" method="post">

         <f:ajax
                                            render="registerpaneli" />

         </p:commandButton>
                </td>
            </tr>

        </table>

–>

    </h:panelGroup>

I registraion panel cant hiden.

What is the problem ?

  • 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-27T20:28:24+00:00Added an answer on May 27, 2026 at 8:28 pm

    Remove the

    <p:commandButton ....>
       <f:ajax render="what-ever">
    </p:commandButton>
    

    By

    <p:commandButton update="what-ever" ../>
    

    Furthermore, you can read Primefaces’ Document and its demo.

    Because in Primefaces, most components are compatible with Ajax, especially <p:commandButton/> because it has Ajax turned on by default.

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

Sidebar

Related Questions

I'm trying to make a user login view, and It keep failing. This is
I'm trying make a login window where a user is prompted to enter their
I'm trying to make a login page using html, ajax & ASP.NET.The data is
i'm trying to make a login page in php using ajax and php functions..
I have been trying to make a user login page that, when the user
Hello I'm trying to make a simple web chat, and I want the user
I am trying to make a multi user login system for my java program,
I'm trying to make a login page for my CakePHP website, and my user
I'm trying to make this login page show/format correctly on every browser so far
I 'm trying to make a login information on the top panel, like Welcome

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.