Sunday, 7 June 2015

Add FireAction on button Programmatically

      
import oracle.cabo.ui.action.FireAction;
import oracle.cabo.ui.action.FirePartialAction;
import oracle.apps.fnd.framework.webui.beans.nav.OAButtonBean;

In Controller PR
--------------------


OAButtonBean btn =(OAButtonBean)webBean.findChildRecursive("xxpdf");
  if(btn!=null)
      {
           
        FireAction firePartialAction = new FirePartialAction("notifyBtn");
        btn.setAttributeValue(PRIMARY_CLIENT_ACTION_ATTR,firePartialAction);
        btn.setText("View PDF");
          
      }


  Thanks,
   Dilip
            

Pass Parameter from one Page to another page on Button Event

package hs.oracle.apps.pos.changeorder.webui;

import com.sun.java.util.collections.HashMap;

import oracle.apps.fnd.framework.OAApplicationModule;
import oracle.apps.fnd.framework.OARow;
import oracle.apps.fnd.framework.OAViewObject;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.apps.fnd.framework.webui.beans.nav.OAButtonBean;
import oracle.apps.pos.changeorder.webui.ViewPOControlsCO;
import oracle.cabo.ui.action.FireAction;
import oracle.cabo.ui.action.FirePartialAction;

import oracle.jbo.Row;

public class XXViewPOControlsCO extends ViewPOControlsCO
{
  public XXViewPOControlsCO()
  {
  }

  public void processRequest(OAPageContext pageContext, OAWebBean webBean)
  {
    super.processRequest(pageContext, webBean);
           OAApplicationModule am =(OAApplicationModule)pageContext.getRootApplicationModule();
           if(am!=null)
            {
            OAViewObject vo = (OAViewObject)am.findViewObject("PosViewHeadersVO");
            if(vo!=null)
            {
             Row row = (OARow)vo.getCurrentRow();
            }
   
      OAButtonBean btn =(OAButtonBean)webBean.findChildRecursive("xxpdf");
            if(btn!=null)
            {
             FireAction firePartialAction = new FirePartialAction("notifyBtn");
             btn.setAttributeValue(PRIMARY_CLIENT_ACTION_ATTR,firePartialAction);
              btn.setText("View PDF");
            }
         

     
       }
         
  }
 


  public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
  {
    super.processFormRequest(pageContext, webBean);
    String str1 =pageContext.getParameter("event");
      OAApplicationModule am =(OAApplicationModule)pageContext.getRootApplicationModule();
      if(am!=null)
       {
       OAViewObject vo = (OAViewObject)am.findViewObject("PosViewHeadersVO");
       if(vo!=null)
       {
        Row row = (OARow)vo.getCurrentRow();
           pageContext.writeDiagnostics(this,"This is PFR POHEADERID:"+row.getAttribute("PO_HEADER_ID"),1);
       }
   
      OAButtonBean btn =(OAButtonBean)webBean.findChildRecursive("xxpdf");
   
    if("notifyBtn".equals(str1))
    {  
        pageContext.setForwardURL("OA.jsp?OAFunc=PO_ORDER&poMode=viewOnly&poCallingModule=notification&poHideUpdate=Y&retainAM=Y&addBreadCrumb=Y&poHeaderId="+vo.getCurrentRow().getAttribute("PO_HEADER_ID"),
        null,
        OAWebBeanConstants.KEEP_MENU_CONTEXT,
        null,
        null,
        true,//retain AM
        OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
        OAWebBeanConstants.IGNORE_MESSAGES);
    }
  }
}}




Thanks,
Dilip

Saturday, 7 February 2015

Date Format Conversion

Sample Code:
  
 oracle.jbo.domain.Date date1 = am.getOADBTransaction().getCurrentDBDate();
java.text.SimpleDateFormat displayDateFormat = new java.text.SimpleDateFormat ("dd-MM-yyyy hh:mm s");
         String OracleDateForm = displayDateFormat.format(date1.dateValue());

Saturday, 1 November 2014

Extended VO is Read Only

Error:
Each row in the Query Result Columns must be mapped to a unique Query Attribute in the Mapped Entity columns.

Try with below options.

1.Each row in the query result columns must be maped to a unique query attribute in the mapped entity columns(Check any attribute is Transiet).

2.Check Your Jdeveloper Version is correct?

3. Try to Create Fresh VO Extension in new WorkSpace.

Thanks,
Dilip

Saturday, 28 June 2014

Right alignment of field (with data type varchar2) in OAF

//In Controller

public void processRequest(OAPageContext pageContext, OAWebBean webBean)
 {
        super.processRequest(pageContext, webBean);
          CSSStyle csNum = new CSSStyle();
           csNum.setProperty("display", "block");
           csNum.setProperty("width", "75px");
           csNum.setProperty("text-align", "right");
         OAMessageStyledTextBean omstb1 =
            (OAMessageStyledTextBean)webBean.findChildRecursive("Segment1");
           omstb1.setInlineStyle(csNum);
}

Launching Oracle E-Business Suite Forms from OA Framework Pages


To launch an Oracle E-Business Suite form from OA Framework, you must first define a button, link or image web bean.

Declarative Implementation

Step 1: In the OA Extension Structure pane, select the region in which you want to create the web bean to launch an Oracle E-Business Suite form.
Choose New > Item from the context menu.

Step 2: Set the ID property for the item, in accordance with the OA Framework File Standards, and set the Item Style property to button, image, or link.

Step 3: Set the Destination URI property of the item with a value following this format .

Syntax:
form:responsibilityApplicationShortName:responsibilityKey:securityGroupKey:functionName

Step 4: If you wish to pass parameters to the form, set the Destination URI property with a value using the following format (Note that the parameter list is delimited by a space between each "parameter=value" pair):

Syntax with parameter:

form:responsibilityApplicationShortName:responsibilityKey:securityGroupKey:functionName:param1={@value1}

for Example:
Here I am Launching Invoice Workbench FORM. It's Query Invoice Workbench data on the basis of passed Parameter.

Item: MessageStyleText
ID:InvoiceId

Destination URI ="form:SQLAP:PAYABLES_MANAGER:STANDARD:AP_APXINWKB:INVOICE_ID={@InvoiceId}"

Thursday, 19 December 2013

How to Find OAF Page Function


1)Go to Page and click on about this page

2) copy page path  /xxx/oracle/apps/per/selfservice/appraisals/objectives/webui/ObjSettingPG

3)Click on pageContext Tab

4)click on Expand all
 then search /xxx/oracle/apps/per/selfservice/appraisals/objectives/webui/ObjSettingPG

5)Then you get function name under function column and page path under html call column