Saturday, May 30, 2015


ADF- Customizing BC Error Messages

How to customize Oracle business component error messages , to be user friendly message?



ADF - Create Detail with Multiple-Masters Tables

In this Demo I'll discuss with you , how to create One detail view object with two or more masters tables ?
only one trick will resolve the issue !!

Friday, May 29, 2015

ADF – selected value from SelectOneChoice  Components


In this article I’ll discuss how to get Values from SelecrtOneChoise Component rather than index
Before we Start . you should know the Problem.

Case :
We have jspx page contains SelectOneChoise Component depend on List of value from DepartmentVO .
 We need to return its value when user change the value of this Component.
The value must return DepartmentVO attributes .new and old value .

Problem :
When you try to get value direct with EL , The result will return index of current row for DepartmentVO (List of Value ),  when we need return real data .


Solution :
1-      Create new jspx page .
2-      Drag EmployeesVO as form .
3-      Create two inputText  for new Value and Two inputText for old Value .
4-      Add custom code in backbean , ValueChangeListener property
5-      Set partial trigger property reference to soc1 (SelectOnceChoise Component)
6-      Set autosubmit propriety for soc1


    public void soc1_valueChangeListener(ValueChangeEvent valueChangeEvent) {
        BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
        JUCtrlListBinding listBinding =(JUCtrlListBinding)bindings.get("DepartmentId");
        Row selectedValue = (Row) listBinding.getSelectedValue();
        Object nDeptid = selectedValue.getAttribute("DepartmentName") ;
        Object nDeptname = selectedValue.getAttribute("DepartmentId") ;
        Object nLocation = selectedValue.getAttribute("LocationId") ;
        it10.setValue(nDeptid);
        it11.setValue(nDeptname);

        int ind = Integer.parseInt(valueChangeEvent.getNewValue().toString()) ;
        listBinding.setSelectedIndex(ind);
        selectedValue = (Row) listBinding.getSelectedValue();
        Object oDeptid = selectedValue.getAttribute("DepartmentName") ;
        Object oDeptname = selectedValue.getAttribute("DepartmentId") ;
        Object oLocation = selectedValue.getAttribute("LocationId") ;       
        it12.setValue(oDeptid);
        it13.setValue(oDeptname);
    }



















O racle  SQL WITH Clause         subquery factoring     or         Materializing   subqueries                                 (Sim...