I am doing my first
JSF project and i am noticing some strange behavior with GET requests, ViewParams and Primefaces AJAX calls. I am sure my problems are probably just misunderstanding how JSF works.
I have a list of items which can be edited thru a link which looks like
the meat of getItem bean is as follows
getItem.xhtml
Clicking on the edit item link fires initGetItem and then setItemId as I would expect and the page display fine. However whenever the autocomplete AJAX calls are made it fires the setItem ID again which forced me to add the following code in the setItem Id
This seems to take care of resetting the item, seems like a hack but i can live with it for now. When the user takes the happy path click edit, update item,and click save everything works great. However when the user clicks the back button, edits the field and clicks save the initGetItem fires and not the setItemId so it inserts a new item. Any ideas?