Today after the page jump, clearly executed the query, and the query statement is correct, the page does not display data, and click Submitbutton Package Browser back exception.
The code is as follows:
Oaviewobjectimpl vo= (Oaviewobjectimpl) am.findviewobject ("XXXVO1"); vo. ExecuteQuery (Headerid); Public void ExecuteQuery (number Headerid) { clearcache (); Setwhereclauseparams (null); Setwhereclauseparam (0, Headerid); ExecuteQuery (); }
Print Log discovery:
Vo.getmaxfetchsize () ==0;
Vo.getfetchrowcount () ==0;
Therefore, the page does not display data and triggers the post data, causing the browser to back out of the exception.
The code is modified to look as normal.
Oaviewobjectimpl vo= (Oaviewobjectimpl) am.findviewobject ("XXXVO1"); Vo.clearcache (); Vo.reset (); Vo.setmaxfetchsize (-1); Vo. ExecuteQuery (Headerid); Public void ExecuteQuery (number Headerid) { clearcache (); Setwhereclauseparams (null); Setwhereclauseparam (0, Headerid); ExecuteQuery (); }
This has made me
Vo.clearcache (); Vo.reset (); Vo.setmaxfetchsize (-1);
Use the VO reset and clear cache both in the Processformrequest before redirecting to page again as well as in processrequ EST before initializing the VO.
But, why???
These three methods generate a strong interest.
Query Jdev Doc Gets the following results:
The official documentation on the ClearCache () method is described below:
ClearCache
public void ClearCache () Clears the View object cache.
This method can be called for resource conservation. Calling this method also forces a automatic re-execution of the query for all rowsets, which refreshes the cache from the Database.
Specified by:
ClearCache in Interface ViewObject
Overrides:
ClearCache in class Oajboviewobjectimpl
About the Reset () method is not yet found in the document description.
The official documentation for Setmaxfetchsize () is described below:
Setmaxfetchsize
public void setmaxfetchsize (int size) Maximum number of rows to fetch when a query is executed. This number takes effect the next time a query is executed.
Passing '-1 ' would retrieve all the rows. This is the default behavior. (For OA Framework view objects, however, OA framework initializes the maximum fetch size to being the value specified by "Vo_ Max_fetch_size "profile option value".)
Passing ' 0 ' would result in the database query isn't being executed and also mark the View object as properly prepared for QU ery execution.
Specified by:
setmaxfetchsize in interface ViewObject
Overrides:
setmaxfetchsize in class Viewobjectimpl
Parameters:
size-maximum number of rows to fetch
See Also:
executeQuery (), Ispreparedforexecution (), Setpreparedforexecution (Boolean flag)
Use of Oaviewobject in ClearCache (), Reset (), Setmaxfetchsize (-1)