To create a run time VO you have to follow these steps which are given below:
OAApplicationModule am = pageContext.getApplicationModule(webBean);
OADBTransaction oadbtransaction = am.getOADBTransaction();
String validateStr1 = "select column_name from table_name where column_name = :1";
ViewObject validateViewObject1 = (ViewObject)am.findViewObject("ValidateCodeVO1");
if (validateViewObject1 == null)
validateViewObject1 = (ViewObject)am.createViewObjectFromQueryStmt("ValidateCodeVO1", validateStr1);
validateViewObject1 = (ViewObject)am.findViewObject("ValidateCodeVO1");
if (validateViewObject1 != null)
{
validateViewObject1.setWhereClause(null);
validateViewObject1.setWhereClauseParam(0, pageContext.getParameter("NtfId"));
validateViewObject1.executeQuery();
validateViewObject1.reset();
oracle.jbo.Row validaterow = validateViewObject1.first();
if (validaterow != null)
message_type = validaterow.getAttribute(0).toString();
}
Sunday, September 13, 2009
Subscribe to:
Post Comments (Atom)
2 comments:
Thanks ! Works cool.
Arun
thanks mate ! i used your suggestion ! -- krakx !:-)
Post a Comment