Monday 14 April 2014

To Create a web service of java class in JDeveloper.

http://www.oracle.com/technetwork/developer-tools/jdev/ccset16-all-096507.html

Saturday 22 March 2014


To make the updated data reflect programmatically use Partial Trigger. 

        Connection conn=null;        Class.forName ("oracle.jdbc.driver.OracleDriver");
        try{
        conn = DriverManager.getConnection
                ("jdbc:oracle:thin:@localhost:1521:xe", "SYSTEM", "singh");
    }catch(Exception e){
        e.printStackTrace();
        }    
        String sql="UPDATE A SET COUNTRY='Pakistan' WHERE ID=1";
           Statement stm  =conn.prepareStatement(sql);
       int i= stm.executeUpdate(sql);
        DCBindingContainer dcbc=(DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
        DCIteratorBinding dcit=dcbc.findIteratorBinding("ViewObj1Iterator");
        dcit.executeQuery();
        AdfFacesContext.getCurrentInstance().addPartialTarget(getTable());

Wednesday 19 February 2014

Calling a view Activity dynamically in Task Flow.

1. to call view 2 from from view if action out come comes yes then view reflects other wise view1. 

2 From Outcome of Command links are yes & no.





    
                                                                           
3 set a method in a bean on Action of view1(.jsff or .jspx page) whose return type is String  and return yes or no  on the business condition & accordingly screen reflects to the user.

    public String actionmethod() {
        // Add event code here...
       if(a==b){
return "yes";
}else
        return "no";
    }                                                                                                       


Using Value change Listener in ADF

while using value change listener by default  auto submit is false in behavior of Property Inspector
post making it true change listener method works on selecting choices from drop down as shown below



    public void changelistener(ValueChangeEvent valueChangeEvent) {
        // Add event code here...
        System.out.println("Valuechaneglistene"+(String)valueChangeEvent.getNewValue());
     
    }

sop starts getting reflected according to the value map in drop down.

Wednesday 12 February 2014

Abandoning a Bounded Taskflow with Stand-Alone Pages

 How to manage more than one Bounded task flows from single page.

https://blogs.oracle.com/jheadstart/entry/core_adf_11_abandoning_a_bound

Tuesday 11 February 2014

Programmatically Navigating to another page in adf / jsf

Here is the sample code which can be used to programmatically navigating to another page in jsf or adf

FacesContext fctx = FacesContext.getCurrentInstance();
Application application = fctx.getApplication();
NavigationHandler navHandler = application.getNavigationHandler();
navHandler.handleNavigation(fctx,null, "name of navigation case");

Monday 10 February 2014

oracle.jbo.TxnValException: JBO-27023: Failed to validate all rows in a transaction.
Detail :- oracle.jbo.RowValException: JBO-27024:





user may try to insert more then  single row in DB with Same primary Key.
for Instance:----






            ViewObject vo = (ViewObject)dit.getViewObject();
            CityViewRowImpl cvrt=(CityViewRowImpl)vo.createRow();
            cvrt.setCity1("California1");
            cvrt.setState("Arizona1"); // if state is primary key then if this method called many times Excep.throw
            vo.insertRow(cvrt);
            vo.getApplicationModule().getTransaction().commit();