In Process Form Request when Save Button Is Clicked
if(pageContext.getParameter("save")!=null)
{
Row row=vo.first();
ArrayList errMsg=new ArrayList();
try
{
int sal=Integer.parseInt(row.getAttribute("Sal").toString());
System.out.println(sal);
int comm=Integer.parseInt(row.getAttribute("Comm").toString());
System.out.println(comm);
if(sal>100)
{
System.out.println(sal);
errMsg.add(new OAException("Salary Less than 100"));
}
if(comm>100)
{
System.out.println(comm);
errMsg.add(new OAException("Comm Less tahn 100"));
}
System.out.println(errMsg);
}
catch(Exception e)
{
e.printStackTrace();
}
am.getOADBTransaction().commit();
errMsg.add( new OAException("Rebate Created Successfully"));
System.out.println(errMsg);
OAException.raiseBundledOAException(errMsg);
}
{
Row row=vo.first();
ArrayList errMsg=new ArrayList();
try
{
int sal=Integer.parseInt(row.getAttribute("Sal").toString());
System.out.println(sal);
int comm=Integer.parseInt(row.getAttribute("Comm").toString());
System.out.println(comm);
if(sal>100)
{
System.out.println(sal);
errMsg.add(new OAException("Salary Less than 100"));
}
if(comm>100)
{
System.out.println(comm);
errMsg.add(new OAException("Comm Less tahn 100"));
}
System.out.println(errMsg);
}
catch(Exception e)
{
e.printStackTrace();
}
am.getOADBTransaction().commit();
errMsg.add( new OAException("Rebate Created Successfully"));
System.out.println(errMsg);
OAException.raiseBundledOAException(errMsg);
}
Output Like
No comments:
Post a Comment