d-man
d-man

Reputation: 58063

JSF2 render retraining old values

I am using JSF2 with @ViewScoped

I have table listing, cliking on row opens record in disabled='true mode'
2- ON the popup in disabled view button called 'Edit'
3- When user clicks upon edit button, all fields on the form which are disabled will become enabled.

Problem is in disabled mode it is fine but when user clicks upon edit button it start displaying few values from old record which was being clicked.

It is not happening every time but randomly when you start clicking.

I am not reloading any data when user clicks upon edit button instead I only make ajax call and set attrib val to true and on the bases of that I render model values and it dispalys enabled values.

is it cache problem or any thing else ???
help required.

Upvotes: 1

Views: 224

Answers (1)

Addicted
Addicted

Reputation: 1704

In your bean set enableStatus =0;
and in edit button and all of your text fields, set disabled="#{bean.enableStatus==0}"
when u will click on edit then set enableStatus = 1 in your action method and reRender it.
You will get what you want....

Upvotes: 1

Related Questions