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);
      }
  }

}

5 comments:

Archana Gaikwad said...

Good Start.....

pankaj kulkarni said...

Very Good Very Good

Neil said...

Sir ,
This is helpful to me
Thanks

Shrikant Aughad said...

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

Roshan Dahatonde said...

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