Tuesday, 4 December 2012

Hello World In OAF:Controller Code

/**
 * Controller for ...
 */
public class HelloWorldCO 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("GoBtn")!=null)
      {
       String userContent = pageContext.getParameter("HelloItem");
       String message ="Hello,"+userContent+"!";
       throw new OAException(message,OAException.INFORMATION);
      }
  }

}

4 comments:

Unknown said...

Good Start.....

Unknown said...

Very Good Very Good

Unknown said...

Good Work Bro'... But Sky is the Limit. Waiting for some new things.

Unknown said...

Its really help full for fresher .
All The Best..