• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Components value lost during ajax update

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am new to primefaces and JSF and seriously in need of some help.

I have a panel containing some inputtext fields. Above this panel I have radio buttons and on change of this radio button, I update my form.

The problem is that if I add some text in the input fields and change the radio button, the form is updated and my new values of inputtext fields are lost.


Please suggest what is wrong and how to store the component values during form update.

I am using JSF 2.0 and primefaces 3.3.1

Thanks in advance.
 
Bartender
Posts: 1051
5
Hibernate Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kumar

Can you post your XHTML for the form so that we can try and help you further.
 
Kumar Sugandh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi James,

Below is my code for XHTML and backing bean. xhtml code is long but easy to understand ;)



Backing Bean code:


AccountHolderDetailVO


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.

 
James Boswell
Bartender
Posts: 1051
5
Hibernate Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try removing the event attribute of your ajax request.
 
Kumar Sugandh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, still it didn't work.
 
Forget Steve. Look at this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic