cancel
Showing results for 
Search instead for 
Did you mean: 

Asynchronous Views

0 Kudos

I´ve seen this link:

https://help.sap.com/saphelp_nw75/helpdata/de/4a/498e58cb511c6ce10000000a42189b/content.htm?frameset...

But im not able to add a view/application to an applicationcontainer. Any help? any code example?Documentation about this is really poor.

I suppose that is something like that....

IWDApplicationContainer appContainer = (IWDApplicationContainer) view.getElement("ApplicationContainer");

IWDApplicationHandle application; //How to get this????

appContainer.setApplication(application);

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

https://help.sap.com/doc/2f39047ed6b141cb83658041d2d4e029/7.5.7/en-US/CE/wdr/com.sap.wdr/index.html?...

https://help.sap.com/doc/2f39047ed6b141cb83658041d2d4e029/7.5.7/en-US/CE/wdr/com.sap.wdr/com/sap/tc/...

In wdDoModify of the «embedding» view:

public void wdDoModifyView(com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
  {
    //@@begin wdDoModifyView
        if (firstTime) {
              //acAsync is the id of the App Containter, given in the UI editor of the embedding UI
              IWDApplicationContainer acAsync = (IWDApplicationContainer) view.getElement("acAsync"); 
              IWDDeployableObject deployableObject = WDDeployableObject.getDeployableObject("vendor.tld/tc~wd~package~of~dc");

              try {
                    // name of the embedded Application
                    WDDeployableObjectPart applicationPart = deployableObject.getApplication("AsyncApp");

                    IWDApplicationHandle appHandle = wdComponentAPI.getApplication().getApplicationEnvironment().createHandle(applicationPart);
                    acAsync.setApplication(appHandle);

                    WDCallExecutionMode executionMode = appHandle.start(null);

              } catch (WDDeploymentException e) {
                    wdComponentAPI.getMessageManager().reportException("Error while loading AsyncApp");
                    e.printStackTrace();
              }
        }
       
    //@@end
  }

In wdDoInit of the «embedded» view, contained in the application loaded above («AsyncApp» in this example):

public void wdDoInit()
  {
    //@@begin wdDoInit()
        IWDApplicationEnvironment appEnvironment = wdComponentAPI.getApplication().getApplicationEnvironment();
        appEnvironment.setFollowUpExecutionMode(WDActionExecutionMode.ASYNCHRONOUS);
        appEnvironment.setEstimatedTimeToUpdate(10000l);
        // Action created in the embedded view
        IWDAction loadAppDataAction = wdControllerAPI.getAction("LoadApplicationData");
        appEnvironment.registerFollowUpAction(loadAppDataAction, new Object [] {});
   //@@end
  }

0 Kudos

Thank you I'll try this

Answers (0)