Sunday, April 5, 2009
How to hide OAImageBean in Controller
import oracle.apps.fnd.framework.webui.beans.OAImageBean;
import oracle.apps.fnd.framework.OAViewObject;
import oracle.apps.fnd.framework.OARow;
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
OAApplicationModule am = pageContext.getApplicationModule(webBean);
String userid = pageContext.getUserId()+"";
if (userid.equals(pageContext.getUserId()+""));
{
OAViewObject oaviewobject1 =(OAViewObject)am.findViewObject("EmployeeEOVO1");
OAViewObject svo =(OAViewObject)am.findViewObject("StatusPVO1");
OARow row1 = (OARow)svo.first();
if (oaviewobject1 != null)
{
System.out.println("Inside");
oaviewobject1.reset(); //New line added
oaviewobject1.next(); //new line added
OARow row = (OARow)oaviewobject1.getCurrentRow();
String fullName = (String)row.getAttribute("Attribute1");
if (fullName.equals("A"))
{
OAImageBean imagebean = (OAImageBean)webBean.findChildRecursive("approved");
OAImageBean imagebean1 = (OAImageBean)webBean.findChildRecursive("rejected");
OAImageBean imagebean2 = (OAImageBean)webBean.findChildRecursive("inProcess");
imagebean.setRendered(true);
imagebean1.setRendered(false);
imagebean2.setRendered(false);
}
else if (email.equals("R"))
{
OAImageBean imagebean = (OAImageBean)webBean.findChildRecursive("approved");
OAImageBean imagebean1 = (OAImageBean)webBean.findChildRecursive("rejected");
OAImageBean imagebean2 = (OAImageBean)webBean.findChildRecursive("inProcess");
imagebean.setRendered(false);
imagebean1.setRendered(true);
imagebean2.setRendered(false);
}
else if (email.equals("W"))
{
OAImageBean imagebean = (OAImageBean)webBean.findChildRecursive("approved");
OAImageBean imagebean1 = (OAImageBean)webBean.findChildRecursive("rejected");
OAImageBean imagebean2 = (OAImageBean)webBean.findChildRecursive("inProcess");
imagebean.setRendered(false);
imagebean1.setRendered(false);
imagebean2.setRendered(true);
}
else
{
System.out.println("Inside ELSE");
OAImageBean imagebean = (OAImageBean)webBean.findChildRecursive("approved");
OAImageBean imagebean1 = (OAImageBean)webBean.findChildRecursive("rejected");
OAImageBean imagebean2 = (OAImageBean)webBean.findChildRecursive("inProcess");
imagebean.setRendered(false);
imagebean1.setRendered(false);
imagebean2.setRendered(false);
}
}
}
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.