Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Checking for PostBack

843842Sep 6 2004 — edited Jan 18 2008
I have a form with several selectOneMenu's that are populated from a Database. On this form I have one menu option that only changes whether or not a specific panel is hidden or visible. Because this has to submit back to the server, I realized that every time I change this option, all my selectOneMenu's are going to hit the database again to get their values. This is not good.

In .NET (don't smite me) there is a check that is basically something like if(!Page.IsPostBack) and what that does is checks to see if the page was submitted back to itself and if not, it will enter that loop.

I need something similar in JSF so that if the page is posted back, I don't need to get all those values from the database again. It should just use what values the backing bean already has.

Any ideas?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 15 2008
Added on Sep 6 2004
13 comments
414 views