我是 OAF 的新手。我正在编写一个用于在浏览器窗口中显示数据的小程序。但是根据 OAF 文档,当页面加载时processRequest()应该自动调用。但在我的情况下,该processRequest()方法没有被调用。因此,请任何人帮助我获取processRequest()加载页面时要调用的方法。
这是我的控制器代码。注意我将此控制器关联到一个页面。加载页面时,processRequest()不调用方法。
public class MyController 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)
  {
   /* The below code line is used to initialize the application module */
    System.out.println("inside processRequest");
    OAApplicationModule am = 
      (OAApplicationModule)pageContext.getApplicationModule(webBean);
     // am.invokeMethod("execVO");
    /* The below code line is used to initialize VO*/
   OAViewObject vo = (OAViewObject)am.findViewObject("EmpView1");
    /* DataDisplayVO1 is the instance name in AM which is the original name of the VO */
    vo.executeQuery();
    RowSetIterator rowsetIterator = vo.createRowSetIterator(null);
    while (rowsetIterator.hasNext())
    {
      Row r = rowsetIterator.next();
      System.out.println("Empno is ... " + r.getAttribute("Empno"));
    }
  }