Thursday, October 25, 2018

java.sql.SQLException: Invalid column type in OAF

This blog is about how to resolve the above error.

This error is related to VO. If we are defining any dynamic parameters in VO like below then we might come across this error:

Eg.:
SELECT to_char(order_number) AS order_number, flow_status_code  AS order_status
FROM oe_order_headers_all WHERE ORIG_SYS_DOCUMENT_REF like :1 ||':'||'%'



Select Binding style as "Oracle Positional" and your problem will get resolved. Write your comments if you are still facing difficulty.

Tuesday, October 9, 2018

How to call another page on click on a button in OAF and pass the parameters from one page to another

Hello Friends,

Today I am going to tell you how to call another page on click on a button in OAF and pass the parameters from one page to another.

Step1 : Create a page with an item "Message Choice" as item style and give ID as "OrgCode". and create a submit button and  give ID as Submit in item property.

(You can choose any item style as per your requirement)

Step3 : Create a controller and write the below code in ProcessFormRequest Method.

  public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
  {
    super.processFormRequest(pageContext, webBean);
      OAApplicationModule am = pageContext.getApplicationModule(webBean);
               if (pageContext.getParameter("Submit") != null)
                {  
      String strOrgCode = pageContext.getParameter("OrgCode");
           pageContext.forwardImmediately("OA.jsp?OAFunc=RAC_PLANNED_HOURS&OrgCode="+strOrgCode,
           null,
           OAWebBeanConstants.KEEP_MENU_CONTEXT,
           null,
           null,
           true, // retain AM
           OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
           }
  }

 

How To Create Hyperlinks in OA Framework

Hello Friends,

Today I am going to tell you how to create hyperlinks in OA Framework. If you have any doubt, you can put your comments in comment box. If you like the post, please hit like button.

Step 1: Create an Item of "Message Styled Text" item style.

Step2: Go to item property, in Navigation section set the destination URL property as below:

OA.jsp?OAFunc=RAC_SHOP_CAP_MANAGEMENT&CCDate={@PlanDate}&OrgCode={OrganizationCode}

RAC_SHOP_CAP_MANAGEMENT  is OAF function to which we want to navigate from hyperlink.

If you don't have function then you can redirect to page directly as below:

OA.jsp?page=/xxcustom/oracle/apps/fnd/webui/HelloWorldPG&CCDate={@PlanDate}&OrgCode={OrganizationCode}


PlanDate and OrganizationCode are VO Attributes whose value we want to pass to another page.

CCDate and OrgCode are the parameters which holds value and we can get the values of these parameters in next page.

Step 3: See below screen shot for all the peoperty: