on ‎2016 Mar 08 9:20 PM
Hi,
is it possible to include one app in another app?
The problem is:
I want to display details of an entity (with dynamic display of its attributes) in different kind of ways.
One time standalone.
One time in an approval task.
One time in an approval task displayed after selected in a list.
One time in an approval process.
And maybe some other scenarios....
So in the end I don't want to build (and maintain!) my dynamic app multiple times!
Is there any example or solution for something like this?
Thanks and kind regards,
Dominik
Request clarification before answering.
do you know how to use component?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think you have seen a lot
sap.ui.getCore().attachInit(function () {
new sap.ui.core.ComponentContainer({
name : "sap.ui.demo.wt"
}).placeAt("content");
});
component(like in web dynpro) is the reusable unit. in the component you can return your view in method createcontent. any place you want to put your view, just use that code(new a component)
Okay, thank you.
But how do I have to refer to an other application/component?
Will he find the application by name!?
.... If I give the ComponentContainer a name of an application I got an error like:
Uncaught Error: resource zv/research/embed/view/View1.view.xml could not be loaded from ./view/View1.view.xml. Check for 'file not found' or parse errors.
sap.ui.define([
"sap/ui/core/mvc/Controller"
], function(Controller) {
"use strict";
return Controller.extend("zv.research.embed.controller.View1", {
// Called by Button
onTest: function(){
var oCompCont = new sap.ui.core.ComponentContainer("CompCont", {
name: "zv.application.dummy02"
// url: "/zv/application/dummy02"
});
oCompCont.placeAt("__xmlview0--myContent");
}
});
});
My View-Controller.
<mvc:View controllerName="zv.research.embed.controller.View1" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:mvc="sap.ui.core.mvc"
xmlns="sap.m">
<App>
<pages>
<Page title="{i18n>title}" id="myContent">
<content>
<Text text="zv.research.embed - View1"></Text>
<Button text="Do something special!" press="onTest"></Button>
</content>
</Page>
</pages>
</App>
</mvc:View>
My View.
For more information:
I am testing in Web IDE.
zv.application.dummy02 is a application in my Web IDE.
I want to embed it in my view.
| User | Count |
|---|---|
| 9 | |
| 7 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.