aspose file tools*
The moose likes JSF and the fly likes Components value lost during ajax update Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Components value lost during ajax update" Watch "Components value lost during ajax update" New topic
Author

Components value lost during ajax update

Kumar Sugandh
Greenhorn

Joined: Dec 29, 2012
Posts: 7
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

Joined: Nov 09, 2011
Posts: 973
    
    5

Kumar

Can you post your XHTML for the form so that we can try and help you further.
Kumar Sugandh
Greenhorn

Joined: Dec 29, 2012
Posts: 7
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

Joined: Nov 09, 2011
Posts: 973
    
    5

Try removing the event attribute of your ajax request.
Kumar Sugandh
Greenhorn

Joined: Dec 29, 2012
Posts: 7
No, still it didn't work.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Components value lost during ajax update
 
Similar Threads
default button / sequence of setter calls
inputText values don't get updated to database
h:inputText is not updated if the backing bean value has changed
Enable dynamic inputText