Web Service Across Pages Called Twice
By Shay Shmeltzer on Mar 31, 2011
I first ran into this little trickery a few weeks back while helping some internal team with a POC, then yesterday this popped up again in another scenario, so here is a little thing that is a very common mistake when you first start to work with the ADF Data control.
The scenario is that you add a parameter page for the Web service in a JSF and a button that calls the Web service, and then you navigate to another page to show the results.
If your results are a collection of data, if you'll look carefully you'll notice that the Web service is actually invoked twice.
Once from the button, but then another time in a hidden way in the results page.
One thing you might encounter then is that the results that actually show up on the results page don't match your original parameters.
The solution is to have the first page just set the parameters and then pass them to the second page - where they are going to be used in the call to the Web service.
Here is a short demo that might make this clearer: