• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Components value lost during ajax update

 
Kumar Sugandh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • 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.
 
James Boswell
Bartender
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • 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
  • 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
Chrome Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
No, still it didn't work.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic