public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processFormRequest(pageContext, webBean);
if(pageContext.getParameter("Condition1")!=null)
{
String name=pageContext.getParameter("ItemAttributeID");
/* This will throw an error with the message name entered in ItemAttributeID */
throw new OAException(name,OAException.ERROR);
/* throw new OAException("Custom Message",OAException.ERROR); */
}
if(pageContext.getParameter("Condition2")!=null)
{
String name=pageContext.getParameter("ItemAttributeID");
/* This will give us the confirmation message entered in ItemAttributeID */
throw new OAException(name,OAException.CONFIRMATION);
}
if(pageContext.getParameter("Condition3")!=null)
{
String name=pageContext.getParameter("ItemAttributeID");
/* This will give us the warning message entered in ItemAttributeID */
throw new OAException(name,OAException.WARNING);
}
if(pageContext.getParameter("Condition4")!=null)
{
String name=pageContext.getParameter("ItemAttributeID");
/* This will give us the warning message entered in ItemAttributeID */
throw new OAException(message, OAException.INFORMATION);
}
}
{
super.processFormRequest(pageContext, webBean);
if(pageContext.getParameter("Condition1")!=null)
{
String name=pageContext.getParameter("ItemAttributeID");
/* This will throw an error with the message name entered in ItemAttributeID */
throw new OAException(name,OAException.ERROR);
/* throw new OAException("Custom Message",OAException.ERROR); */
}
if(pageContext.getParameter("Condition2")!=null)
{
String name=pageContext.getParameter("ItemAttributeID");
/* This will give us the confirmation message entered in ItemAttributeID */
throw new OAException(name,OAException.CONFIRMATION);
}
if(pageContext.getParameter("Condition3")!=null)
{
String name=pageContext.getParameter("ItemAttributeID");
/* This will give us the warning message entered in ItemAttributeID */
throw new OAException(name,OAException.WARNING);
}
if(pageContext.getParameter("Condition4")!=null)
{
String name=pageContext.getParameter("ItemAttributeID");
/* This will give us the warning message entered in ItemAttributeID */
throw new OAException(message, OAException.INFORMATION);
}
}
No comments:
Post a Comment