Skip to Content

Asynchronous Views

Nov 04, 2016 at 09:17 AM


avatar image

I´ve seen this link:¤t_toc=/de/44/789eeed62455cee10000000a1553f6/plain.htm&node_id=301&show_children=false

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????


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Werner Schwarz May 10, 2017 at 08:15 AM

In wdDoModify of the «embedding» view:

public void wdDoModifyView( 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);

                    WDCallExecutionMode executionMode = appHandle.start(null);

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

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();
        // Action created in the embedded view
        IWDAction loadAppDataAction = wdControllerAPI.getAction("LoadApplicationData");
        appEnvironment.registerFollowUpAction(loadAppDataAction, new Object [] {});

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thank you I'll try this