on 2016 Apr 28 10:58 AM
Hi,
We want to create JSView when we are having viewContent as string. For this we don't have viewName, neither we want to create view file for the same. Can we create jsView with such condition?
var oView = sapui.view({
viewName : "AppView", // we don't want to pass viewName
viewContent : sJSContent, // we want to create view by passing this only
type : sapui.core.mvc.ViewType["JS"]
});
Can we do something like that?
Thanks & Regards,
Rhythm
Request clarification before answering.
can you tell us what you are trying to do??
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I want to create view by passing viewType and viewContent, where viewContent is having sapui5 controls in it.
I am able to get view for viewType "XML" but unable to do same for JS.
For instance,
sXMLContent = "<mvc:View xmlns:html=\"http://www.w3.org/1999/xhtml\"
xmlns:mvc=\"sap.ui.core.mvc\"
xmlns=\"sap.m\"
controllerName=\"Sample1.controller.View1\">
<App>
<pages>
<Page title=\"{i18n>title}\">
<content>
<Button text=\"Button\" width=\"100px\" id=\"__button\"/>
</content>
</Page>
</pages>
</App>
</mvc:View>"
var oView = sapui.view({
viewContent : sXMLContent, // Passing string over here
type : sapui.core.mvc.ViewType["XML"]
});
From here i am able to get oView object.
But for corresponding JS content, passing viewContent and type to create view is not sufficient what it says.
Let me know in case of further information required.
User | Count |
---|---|
77 | |
30 | |
10 | |
8 | |
8 | |
7 | |
7 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.