on 11-04-2016 9:17 AM
I´ve seen this link:
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);
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
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.