CO (Controller) Code
--------------------------
Hi All,
I just created simple search page in OAF for Vendor details.
If we give vendor Id then it will display Vendor name, Vendor Id and Vendor Number.
Here is the Controller code.
/*===========================================================================+
| Copyright (c) 2001, 2005 Oracle Corporation, Redwood Shores, CA, USA |
| All rights reserved. |
+===========================================================================+
| HISTORY |
+===========================================================================*/
package Test3.oracle.apps.ap.suppliers.webui;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.framework.webui.OAControllerImpl;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import Test3.oracle.apps.ap.suppliers.server.Test3AMImpl;
import java.io.Serializable;
/**
* Controller for ...
*/
public class Test3CO extends OAControllerImpl
{
public static final String RCS_ID="$Header$";
public static final boolean RCS_ID_RECORDED =
VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
/**
* Layout and page setup logic for a region.
* @param pageContext the current OA page context
* @param webBean the web bean corresponding to the region
*/
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
}
/**
* Procedure to handle form submissions for form elements in
* a region.
* @param pageContext the current OA page context
* @param webBean the web bean corresponding to the region
*/
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{ super.processFormRequest(pageContext, webBean);
String VendorId = null;
if (pageContext.getParameter("Go")!=null)
{
VendorId=pageContext.getParameter("vendorId"); //This is the ID of search box
}
Test3AMImpl av=(Test3AMImpl)pageContext.getApplicationModule(webBean);
Serializable params [ ]={VendorId};
av.invokeMethod("Test3a",params); //Here calling method from AM
if (pageContext.getParameter("Clear")!= null)
{
pageContext.forwardImmediatelyToCurrentPage(null, false, null);
}
}
}
You can See the AM(Application Module)Code Here
--------------------------
Hi All,
I just created simple search page in OAF for Vendor details.
If we give vendor Id then it will display Vendor name, Vendor Id and Vendor Number.
Here is the Controller code.
/*===========================================================================+
| Copyright (c) 2001, 2005 Oracle Corporation, Redwood Shores, CA, USA |
| All rights reserved. |
+===========================================================================+
| HISTORY |
+===========================================================================*/
package Test3.oracle.apps.ap.suppliers.webui;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.framework.webui.OAControllerImpl;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import Test3.oracle.apps.ap.suppliers.server.Test3AMImpl;
import java.io.Serializable;
/**
* Controller for ...
*/
public class Test3CO extends OAControllerImpl
{
public static final String RCS_ID="$Header$";
public static final boolean RCS_ID_RECORDED =
VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
/**
* Layout and page setup logic for a region.
* @param pageContext the current OA page context
* @param webBean the web bean corresponding to the region
*/
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
}
/**
* Procedure to handle form submissions for form elements in
* a region.
* @param pageContext the current OA page context
* @param webBean the web bean corresponding to the region
*/
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{ super.processFormRequest(pageContext, webBean);
String VendorId = null;
if (pageContext.getParameter("Go")!=null)
{
VendorId=pageContext.getParameter("vendorId"); //This is the ID of search box
}
Test3AMImpl av=(Test3AMImpl)pageContext.getApplicationModule(webBean);
Serializable params [ ]={VendorId};
av.invokeMethod("Test3a",params); //Here calling method from AM
if (pageContext.getParameter("Clear")!= null)
{
pageContext.forwardImmediatelyToCurrentPage(null, false, null);
}
}
}
You can See the AM(Application Module)Code Here
No comments:
Post a Comment