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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T02:13:35+00:00 2026-06-17T02:13:35+00:00

I am using PrimeFaces 3.3.1 and JSF 2.0 and server used is Oracle Weblogic

  • 0

I am using PrimeFaces 3.3.1 and JSF 2.0 and server used is Oracle Weblogic 11gR1

Below is my code.

<p:panel id="personDetailsPanelId" header="#{msg.personDetails}">  

            <!-- Radio Button -->  
            <h:panelGrid columns="3" style="align:center">  
                <h:outputText value="#{msg.accountCategory}" />  
                <p:spacer width="10px" />  
                <p:selectOneRadio id="singleJointAccountRadioId"  
                    layout="horizontal"  
                    value="#{captureAccountDetailBackingBean.accountCategory}">  
                    <f:selectItems  
                        value="#{captureAccountDetailBackingBean.accountcategoryList}">  
                    </f:selectItems>  
                    <p:ajax process="@this" event="change" update="@form"  
                        partialSubmit="true" />  
                </p:selectOneRadio>  
            </h:panelGrid>  

            <p:spacer height="30px;" />  

            <h:panelGrid id="accountDetailsId" columns="3">  
                <h:panelGrid id="firstAccountHolderId" columns="2"  
                    styleClass="float-left ">  
                    <p:graphicImage  
                        value="/com/cas/pages/common/images/person_icon.jpg" />  
                    <h:outputText value="#{msg.firstAccountHolder}" />  

                    <!-- Person Name -->  
                    <h:panelGrid columns="2">  
                        <h:outputText value="#{msg.nameofPerson}" />  
                        <span style="color: red;">*</span>  
                    </h:panelGrid>  
                    <p:inputText  
                        value="#{captureAccountDetailBackingBean.accountHolder1.personName}"  
                        size="25" required="true" />  

                    <!-- Person Address -->  
                    <h:panelGrid columns="2">  
                        <h:outputText value="#{msg.address}" />  
                        <span style="color: red;">*</span>  
                    </h:panelGrid>  
                    <p:inputTextarea  
                        value="#{captureAccountDetailBackingBean.accountHolder1.personAddress}"  
                        rows="3" autoResize="false" required="true" />  

                    <!-- DOB -->  
                    <h:panelGrid columns="2">  
                        <h:outputText value="#{msg.dateOfBirth}" />  
                        <span style="color: red;">*</span>  
                    </h:panelGrid>  
                    <p:calendar  
                        value="#{captureAccountDetailBackingBean.accountHolder1.personDOB}"  
                        navigator="true" showOn="button" size="6" required="true"  
                        pattern="dd/MM/yyyy" />  

                    <!-- Age -->  
                    <h:panelGrid columns="2">  
                        <h:outputText value="#{msg.age}" />  
                        <span style="color: red;">*</span>  
                    </h:panelGrid>  
                    <p:inputText  
                        value="#{captureAccountDetailBackingBean.accountHolder1.personAge}"  
                        size="2" required="true" />  

                </h:panelGrid>  

                <p:spacer width="130px;" />  

                <h:panelGrid id="secondAccountHolderId" columns="2"  
                    styleClass="float-left"  
                    rendered="#{captureAccountDetailBackingBean.accountCategory eq 'Joint'}">  
                    <p:graphicImage  
                        value="/com/cas/pages/common/images/person_icon.jpg" />  
                    <h:outputText value="#{msg.secondAccountHolder}" />  

                    <!-- Person Name -->  
                    <h:panelGrid columns="2">  
                        <h:outputText value="#{msg.nameofPerson}" style="font-size:15px;" />  
                        <span style="color: red;">*</span>  
                    </h:panelGrid>  
                    <p:inputText  
                        value="#{captureAccountDetailBackingBean.accountHolder2.personName}"  
                        styleClass="inputText-style" size="25" required="true" />  

                    <!-- Person Address -->  
                    <h:panelGrid columns="2">  
                        <h:outputText value="#{msg.address}" />  
                        <span style="color: red;">*</span>  
                    </h:panelGrid>  
                    <p:inputTextarea  
                        value="#{captureAccountDetailBackingBean.accountHolder2.personAddress}"  
                        rows="3" autoResize="false" styleClass="inputText-style"  
                        size="25" required="true" />  

                    <!-- DOB -->  
                    <h:panelGrid columns="2">  
                        <h:outputText value="#{msg.dateOfBirth}" />  
                        <span style="color: red;">*</span>  
                    </h:panelGrid>  
                    <p:calendar  
                        value="#{captureAccountDetailBackingBean.accountHolder2.personDOB}"  
                        navigator="true" showOn="button" size="6"  
                        styleClass="inputText-style" required="true" />  

                    <!-- Age -->  
                    <h:panelGrid columns="2">  
                        <h:outputText value="#{msg.age}" />  
                        <span style="color: red;">*</span>  
                    </h:panelGrid>  
                    <p:inputText  
                        value="#{captureAccountDetailBackingBean.accountHolder2.personAge}"  
                        size="2" styleClass="inputText-style" required="true" />  

                </h:panelGrid>  
            </h:panelGrid>  

            <div style="clear: both;" />  
</p:panel>  

Backing bean code:

public class CaptureAccountDetailBackingBean {  

    // For Radio Button  
SelectItem[] accountcategoryList = {new SelectItem("Single", "Single"), new SelectItem("Joint","Joint")};  

String accountCategory;  

    AccountHolderDetailVO accountHolder1 = new AccountHolderDetailVO();  

AccountHolderDetailVO accountHolder2 = new AccountHolderDetailVO();  

    // setter and getters  
}

AccountHolderDetailVO

public class AccountHolderDetailVO {  

    String personName;  
    String personAge;  
    Date personDOB;   
    String personAddress;  

    // getter and setter  
}  

By default, radio button selected is “Single”. And “secondAccountHolderId” panelgrid is displayed when user click on “Joint” radio button.

When I enter any values in the “firstAccountHolderId” or “secondAccountHolderId” panelgrid and change the radio button, the entered values are lost.

  • 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-17T02:13:36+00:00Added an answer on June 17, 2026 at 2:13 am

    Here,

    <p:ajax process="@this" event="change" update="@form" partialSubmit="true" />  
    

    you’re basically telling JSF to submit (process) only the current field (and thus not all other fields of the form!) and then to re-render (update) the entire form (and thus including all other fields which were not been submitted/processed!).

    So, all other fields are simply redisplaying the initial values from the bean instead of the values which were been entered but not submitted.

    You need to change update="@form" accordingly that it only updates the components which really needs to be updated based on the change of the radio button. E.g.

    <p:ajax process="@this" event="change" update="secondAccountHolder" partialSubmit="true" />  
    ...
    <h:panelGroup id="secondAccountHolder">
        <h:panelGrid id="secondAccountHolderId" columns="2"  
                    styleClass="float-left"  
                    rendered="#{captureAccountDetailBackingBean.accountCategory eq 'Joint'}">  
            ...
        </h:panelGrid>
    </h:panelGroup>
    

    See also:

    • Why do I need to nest a component with rendered="#{some}" in another component when I want to ajax-update it?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently migrated my JSF app(using primefaces) from glassfish 3.1 to tomcat7 server. Previously
I'm using JSF templates and Primefaces. Javascript code does not seem to be working
I have implemented a login form using JSF and PrimeFaces. I used this example
I am working on an application using JSF 2.1 and PrimeFaces 3.2, server Tomcat
I am writing a JSF 2.0 Mojarra application using Primefaces 3.3.1 on Tomcat 6.
I'm using this jQuery snippet to create tooltips on some JSF primefaces elements in
I am Using WebSphere Application Server 7.0.0.25, Myfaces 2.0.7, Primefaces 3.4.1 I have the
Is it possible to build a facebook like chat system using JSF(Primefaces modal popup).
I am using Primefaces 3.3 with JSF 2.0 and I tried to include Jquery
I'm having the following issue with a dataTable using PrimeFaces 3.4.1 and JSF 2.1.6.

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.