Showing posts with label Multiple. Show all posts
Showing posts with label Multiple. Show all posts

Saturday, 4 February 2017

OAF - Manipulating the Where Clause of of VO Object


v_ViewObjectImpl.getWhereClause();


v_StringBuffer = v_StringBuffer.append(v_ViewObjectImpl.getWhereClause());


Object[] bindParamList = localOAViewObjectImpl.getWhereClauseParams();


localOAViewObjectImpl.setWhereClauseParams(null);


for (int i = 0, j = bindParamList.length; i < j - 1; i++)

{
bindParamName = bindParamList[i];
v_ViewObjectImpl.setWhereClauseParam(i, bindParamList[i]);
}

OAF - Throwing Individual or Multiple Messages

OAException message = new OAException("APP_CODE", "XXCUST_ORACLE_MESSAGE", null ,OAException.ERROR, null);
throw message;

Tuesday, 8 March 2016

OAF - How to Display multiple errors?

Sometimes you have to show all the error messages at one shot,instead of showing the error messages one by one. In that case, we have to use bundled exception to show multiple error message. Below are the steps:

1. Add the import statements:

import com.sun.java.util.collections.ArrayList;
import oracle.apps.fnd.framework.OAException;
import oracle.apps.fnd.common.MessageToken;

2. Declare an array list.

ArrayList errorMsg= new ArrayList();
3. Raise OAException.
for (int i=0; i< hMember.size(); i++)
{
MessageToken[] token = {
new MessageToken("USER", getOADBTransaction().getUserName()),
new MessageToken("NUM",hMember.getChildNumber())
};
errorMsg.add(new OAException((String)(getOADBTransaction().getMessage("XXCH","XXCH_NO_ACCESS",token))));
}
OAException.raiseBundledOAException(errorMsg);