Monday 28 October 2019

Creating hello World



package com.in28minutes.rest.webservices.restfulwebservices;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

//Controller

@RestController
public class HelloWorldController {
      
       @GetMapping(path = "/hello-world" )
    public String helloWorld() {
       return "Hello World Lokanadham";
    }

}


Creating a Hello World service












package com.in28minutes.rest.webservices.restfulwebservices;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

//Controller

@RestController
public class HelloWorldController {
      
       @RequestMapping(method=RequestMethod.GET,path = "/hello-world" )
    public String helloWorld() {
       return "Hellow World Lokanadham";
    }

}

Tuesday 3 September 2019

Link, Icon Event Sample

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

import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.framework.OAException;
import oracle.apps.fnd.framework.webui.OAControllerImpl;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;

/**
 * Controller for ...
 */
public class LinkImageCO 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 eventNameStr = pageContext.getParameter(EVENT_PARAM);
   
    if (eventNameStr !=null && "dynamicLinkEvent".equals(eventNameStr))
 
   {
    OAException infoMsg = new OAException (" User clicked on Dynamic Event", OAException.INFORMATION);
   
    throw infoMsg;
   
   }
 
   //addEvent
 
    else if (eventNameStr !=null && "addEvent".equals(eventNameStr))
   
    {
    OAException infoMsg = new OAException (" User clicked on Add Image Event", OAException.INFORMATION);
   
    throw infoMsg;
   
    }
 
 
      //deleteEvent
     
       else if (eventNameStr !=null && "deleteEvent".equals(eventNameStr))
     
       {
     
       String nameStr = pageContext.getParameter ("pName");
     
       OAException infoMsg = new OAException (" User clicked on Add Image Event"+"Parameter Value-->"+nameStr, OAException.INFORMATION);
     
       throw infoMsg;
     
       }
 
 
  }

}