Saturday, November 21, 2009

OAF : "The search cannot be executed because the table has pending changes that would be lost. "

ERROR Message :

"The search cannot be executed because the table has pending changes that would be lost. "

----Below is the solution if you are getting the above messages:

Solution :: Add some code in ProcessFormRequest just After calling the AM method:

if ("N".equals(Neelmani)) {
if (pageContext.getParameter(queryBean.getGoButtonName().toString()) !=
null) {
Serializable Params[] =
{ p1, p2, new Number(pageContext.getUserId()) };
Class[] paramTypes =
{ String.class, String.class, Number.class };
am.invokeMethod("getNameSearchResults", Params,
paramTypes);
OAAdvancedTableBean table =
(OAAdvancedTableBean)webBean.findChildRecursive("EmployeeTBL");
// When handling a user initiated search, we always need to execute
// the query so we pass "false" to queryData().
table.queryData(pageContext, false);
}
}