This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hello Tammy, There can be lot of reasons for this to happen, 1. If there is no action attribute defined 2. If there are any validation errors in the page, then the action method in the bean is not invoked and just the page refreshes. 3. If Navigation is not defined in the facesConfig.xml, then the same page refreshes....
Hope this helps you...
Joined: Jan 31, 2007
thank you very much for the info.
the action is defined. when you click a button, the action is supposed to fire, and then the same page is supposed to come back with refreshed data. so i guess all that's left is maybe there's a validation error on the page. does that sound reasonable? and how would i check that?
OK. I added <h:messages and there aren't any. So I'm doing some System.out's and discovered that it looks like it's doing an extra "restore view" cycle.
I'm using an SDO to talk to the database. So it calls the methods to fetch the information TWICE on the first button click, thereby resetting anything that was entered on the form. On the second button click, the method to fetch info from the database is called once, and the information entered on the form is saved.
Display names must be two words: your first name, a space, then your last name. Fictitious names are not allowed.
Please edit your profile and correct your display name since accounts with invalid display names get deleted, often without warning
Joined: Jan 31, 2007
Thanks, everyone, for your help. I did try immediate="true" on the submit button. That didn't work. Everyone who mentioned validations was correct. As soon as I added a numeric validation to the fields I was trying to capture it was fine. I think JSF goes through the validations phase whether you are doing error checking or not. If you are *not* doing error checking, it will hit this phase and refresh the page on you. Good to know.