Contact : oafqueries@gmail.com (OAF/ADF Trainings and Customizations)

Tuesday, May 25

Steps to add a new Object Attribute to AK Region:---

1) Choose the AK Developer responsibility.


2) Click on “Define Attributes”


3) Now define a new Attribute: IBE_OS_ORDER_HOLDS





4) Save Changes and Click on “Define Regions”:


5) Query for region IBE_ORD_SUM_R


6) Now click on “Object” and then “Object Attributes”.


7) Now add a new Attribute which you defined above and match it with the
Column of the view Here I have matched IBE_OS_ORDER_HOLDS with column ORDER_HOLDS
Of the view: IBE_ORDER_SUM_V



8) Save changes and close the form and then Click on “Region Items” in “Define Regions” form


9) Now add a new Object Attribute IBE_OS_ORDER_HOLDS which we created earlier.


Please make sure Node Display and Queryable Checkboxes are clicked in this.






10) Save Changes and Bounce Apache.


This way new column will be added to ibeCOtdOrdSumMain.jsp.

Thanks,
Gaurav

Tuesday, April 20

How to generate XML from Oracle SQL Query

Hi,

PL/SQL package DBMS_XMLGEN creates XML documents from SQL query results. It retrieves an XML document as a CLOB or XMLType value.

Just execute the SQL Statement :

select dbms_xmlgen.getxml('select user_name from fnd_user where rownum < 4') from dual

and in DBMS_OUTPUT you will get the xml data hierarchy and save it as .xml.

Thanks,
Bijender Singh

Friday, February 26

How to split rows in Table or Advance Table???

There has been a Requirement given that there is a split icon present against each row in an Advance Table.
As the user clicks on Split Icon...the parent row should get split into two and the new Row should be inserted right below the parent row.

As an OAF Standard New Row gets inserted at the top of the View Rows.

But we can insert it right below the parent row.

Invoke a method in AM as the User press Split Icon and pass the Id of the row to be splitted.
and loop through the VO rows and identify the row to be splitted.
Then set the current row and insert the new row.


for(xxinvoiceVORowImpl row = (xxinvoiceVORowImpl)vo1.first();
row != null;
row = (xxinvoiceVORowImpl)vo1.next())
{
if(row.getAttribute("InvoiceId")!=null)
{
String invoice = (String)row.getAttribute("InvoiceId").toString();
if(inv.equals(invoice))
{
vo1.setCurrentRow(row);
vo1.next();
xxinvoiceVORowImpl newrow = (xxinvoiceVORowImpl)vo1.createRow();
vo1.insertRow(newrow);
break;
}
}
}

This will insert the row right below the Row on which Split icon was clicked.

Thanks,
Gaurav

Wednesday, November 18

CSS Types

Hi,

Found a very good Document regarding the various CSS types used.

Would like to share..

http://www.oracle.com/technology/tech/blaf/specs/textStandards.html

Thanks,
Gaurav

How to Create Dependent LOV's

You have a requirement that based on dept in lov you need to show only employees for that dept in employee lov


You proceed this way:

Suppose Dept LOV is:

select dictinct dept from dept;



Employee Lov is:



select distinct dept,employee from emp where dept = :1;



Now in department LOV: Dept(messageLOV Input)

create a lov map:

1) LOV region item: department

2) return item : Dept

3) critirea item: Dept



Now in employee LOV: Employee(messageLOV Input):



create two lov maps:
1)

LOV region item: emp

return item:Employee

critirea item: Employee

2)

LOV region item: dept

return item:null

critirea item: Dept

Programatic Query : True



Now for employee LOV region create a new controller and write this code in PR



Dictionary passiveCriteria = (Dictionary)pageContext.getLovCriteriaItems();

String lov = (String)passiveCriteria.get("dept");//grab the department from critirea

System.out.println("Critirea item value is "+lov);

OAApplicationModule am = pageContext.getApplicationModule(webBean);

Serializable para[] = {lov};

am.invokeMethod("executelov",para);



Now in AM set the where clause of employee lov in executelov() method.



public void executelov(String critirea)

{

getemployeelovVO1().setWhereClauseParams(null);

getemployeelovVO1().setWhereClauseParam(0,critirea);

getemployeelovVO1().executeQuery();

}



also in pagelayout controller's process request you need to first execute the employee lov without any data.



like



public void initemployeelov()

{

String test = "";

getemployeelovVO1().setWhereClauseParams(null);

getemployeelovVO1().setWhereClauseParam(0,test);

getemployeelovVO1().executeQuery();

}





Thanks,

Gaurav Sharma