This discussion is archived
4 Replies Latest reply: Jan 31, 2013 3:10 AM by thishum RSS

how to keep entering data in web pages

thishum Explorer
Currently Being Moderated
hi,
i am using ADF 11g 2 release. I have remote application connect with ADF jar lib and local application. when i enter data to my local application and redirect to remote application and enter the data their also. But when I link to local app page via url view but I entered data is not there. I am not commited any page data. In remote app... alos link but there also no data. how to keep them??
all page in taskflow and they connect with control flow case. I made Auto submit true and immediate true for text component.. but no any change.
can not use any setting changes? Need java coding for both application??
hoping chance..
thanks.
  • 1. Re: how to keep entering data in web pages
    Frank Nimphius Employee ACE
    Currently Being Moderated
    Hi,

    you must commit data when you leave a Java EE application. Transactions don't span across java EE application boundaries

    Frank
  • 2. Re: how to keep entering data in web pages
    thishum Explorer
    Currently Being Moderated
    TAHNKS UR REPLY.
    reason is , I try to commit all data through my local application. so I need to make any edit for remote app data after entering local app. Remote application DataControls are in Local application DataControl as nestedd DC.

    this is the code that i try to save all application data using one button. this appear in local app backing bean..

    BindingContext bc =BindingContext.getCurrent();
    DataControlFrame dcf= bc.findDataControlFrame(bc.getCurrentDataControlFrame());
    Collection<DCDataControl> dcCol =dcf.datacontrols();
    for(DCDataControl dCDataControl : dcCol) {             
    if(dCDataControl.isTransactionDirty()){
    try{
    dCDataControl.commitTransaction();
    }
    catch(Exception e) {
    FacesContext facesContext = FacesContext.getCurrentInstance();
    facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, e.getMessage(), null));
    e.printStackTrace();
    }
    }

    these coding are not worked, but above worked.
    DataControlFrame dcframe = bc.findDataControlFrame("TestRemoteAppDataControl");  // dcframe  is null in here
    DCDataControl dc  = bc.findDataControl("TestRemoteAppDataControl");
    *// dcframe.commit();*
    ApplicationModule am = (ApplicationModule)dc.getDataProvider();
    am.getTransaction().commit();
    dc.commitTransaction();

    anyhow help me...
    tahnks.
  • 3. Re: how to keep entering data in web pages
    Sudipto Desmukh Expert
    Currently Being Moderated
    Can you please provide more clarity regarding below statements -
    reason is , I try to commit all data through my local application. so I need to make any edit for remote app data after entering local app. Remote application DataControls are in Local application DataControl as nestedd DC.
    these coding are not worked, but above worked.
    What exactly is not working now and what do you want to achieve ?

    Please follow https://forums.oracle.com/forums/ann.jspa?annID=56 for asking questions effectively on this forum
  • 4. Re: how to keep entering data in web pages
    thishum Explorer
    Currently Being Moderated
    hi,
    I have developed ADF 3 web applications. 2 of them are connect as ADF jar lib files in other application. That application name is local application and other 2 mentioned as remote application(jar lib files). those are in taskflowcall. IN my Local Application which has Application Module. so I selected remote application's Application modules as Application Module Instances. Then in my Local Application DataControl which include that added Application Modules inside the local application DataControl. which are in nested. Remote application DataControl also appear in the local app DataControl.

    Problem is I want to save all applications data through my local application. therefore I link to first remote app and enter data but not commit ,then come back to local app.. and enter data and again goto first remote app again, BUT entered data Not there. so I want to keep them and save all 2 remote app data and local app data.

    DCDataControl dc = bc.findDataControl("TestRemoteAppDataControl"); // *<-- this is one of my remote application Data control name..*
    ApplicationModule am = (ApplicationModule)dc.getDataProvider();
    am.getTransaction().commit();
    dc.commitTransaction();

    this code is not worked. BUT local app data only saved using below code...
    BindingContext bc =BindingContext.getCurrent();
    DataControlFrame dcf= bc.findDataControlFrame(bc.getCurrentDataControlFrame());
    Collection<DCDataControl> dcCol =dcf.datacontrols();
    for(DCDataControl dCDataControl : dcCol) {
    if(dCDataControl.isTransactionDirty()){
    try{
    dCDataControl.commitTransaction();
    }
    catch(Exception e) {
    FacesContext facesContext = FacesContext.getCurrentInstance();
    facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, e.getMessage(), null));
    e.printStackTrace();
    }
    }

    thanks ,hopping chance.
    any who know this??
    thanks.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points