OAF fundmential

CO:

/*===========================================================================+
 |   Copyright (c) 2001, 2005 Oracle Corporation, Redwood Shores, CA, USA    |
 |                         All rights reserved.                              |
 +===========================================================================+
 |  HISTORY                                                                  |
 +===========================================================================*/
package oracle.apps.ont.mypage.webui;

import java.io.Serializable;

import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.framework.OAApplicationModule;
import oracle.apps.fnd.framework.webui.OAControllerImpl;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.apps.ont.mypage.server.MyPageAMImpl;

/**
 * Controller for ...
 */
public class MyPageCO 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);
    if (pageContext.getParameter("HelloButton") != null){
      OAApplicationModule am=pageContext.getApplicationModule(webBean);
      String deptName = pageContext.getParameter("DeptName");
      Serializable[] param = new Serializable[]{deptName};
      am.invokeMethod("showEmp",param);
    }
  }
}

AM:

package oracle.apps.ont.mypage.server;

import java.io.Serializable;
import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
// ---------------------------------------------------------------------
// ---    File generated by Oracle ADF Business Components Design Time.
// ---    Custom code may be added to this class.
// ---    Warning: Do not modify method signatures of generated methods.
// ---------------------------------------------------------------------
public class MyPageAMImpl extends OAApplicationModuleImpl {
    /**This is the default constructor (do not remove)
     */
    public MyPageAMImpl() {
    }

    /**Container's getter for MyPageVO1
     */
    public MyPageVOImpl getMyPageVO1() {
        return (MyPageVOImpl)findViewObject("MyPageVO1");
    }

    /**Sample main for debugging Business Components code using the tester.
     */
    public static void main(String[] args) {
        launchTester("oracle.apps.ont.mypage.server", /* package name */
      "MyPageAMLocal" /* Configuration Name */);
    }
    public void showEmp(String deptName){
        MyPageVOImpl vo=getMyPageVO1();
        vo.initQuery(deptName);
    }
}

VO:

package oracle.apps.ont.mypage.server;

import java.io.Serializable;

import oracle.apps.fnd.framework.server.OAViewObjectImpl;
// ---------------------------------------------------------------------
// ---    File generated by Oracle ADF Business Components Design Time.
// ---    Custom code may be added to this class.
// ---    Warning: Do not modify method signatures of generated methods.
// ---------------------------------------------------------------------
public class MyPageVOImpl extends OAViewObjectImpl {
    /**This is the default constructor (do not remove)
     */
    public MyPageVOImpl() {
    }
    public void initQuery(){
        this.executeQuery();
    }
    public void initQuery(String deptName){
        this.setWhereClauseParams(new String[]{deptName});
        this.executeQuery();
    }
}

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值