on 09-07-2015 6:53 AM
Hi Experts,
I am trying to include an icon tab bar inside a row repeater and it comes as blank. Not even header text of icon tab bar comes.
Any idea how to fix this.
Thanks,
Mansi
Thanks a lot Sai...
My Index.html code is as below:
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>
<script src="resources/sap-ui-core.js"
id="sap-ui-bootstrap"
type="text/javascript"
data-sap-ui-libs="sap.m"
data-sap-ui-theme="sap_bluecrystal"
data-sap-ui-xx-bindingSyntax="complex">
</script>
<!-- only load the mobile lib "sap.m" and the "sap_bluecrystal" theme -->
<script>
sap.ui.localResources("demo_1");
var app = new sap.m.App({initialPage:"idMain1"});
var page = sap.ui.view({id:"idMain1", viewName:"demo_1.Main", type:sap.ui.core.mvc.ViewType.XML});
app.addPage(page);
app.placeAt("content");
</script>
</head>
<body class="sapUiBody" role="application">
<div id="content"></div>
</body>
</html>
@Dennis : I have used binding syntax as complex as well.But still its not coming.
One thing which I found out is that if I change me src from "resources/sap-ui-core.js" to what Sai has used "https://sapui5.hana.ondemand.com/resources/sap-ui-core.js", then it works.
Can u please let me know what difference does this make.
I mean i didn't knew that even src could make such a difference.
Also I have always used resources/sap-ui-core.js then why particularly in this case it didn't worked.
Only for row repeater it gave such a weird problem.
Can you please let me know.
Thanks,
Mansi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
the version on https://sapui5.hana.ondemand.com/resources/sap-ui-core.js is
1.30.8 (built at 20150907-1052, last change )
Mansi,
Can you run below code in your eclipse with src 'resources/sap-ui-core.js'
Regards,
Sai Vellanki.
Mansi,
Issue is not related to version, because I am able to run your code on 1.28.10 as well - Plunker
I'm pointing src to 'https://sapui5.hana.ondemand.com/1.28.10/resources/sap-ui-core.js'
Check inspect element and see whether your able to see IconTab elements like this -
Regards,
Sai Vellanki.
Mansi,
Can you try running below code in your eclipse with src 'resources/sap-ui-core.js'
Regards,
Sai Vellanki.
Same Problem Sai,
with "resources/sap-ui-core.js"
Output is:
with src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
Output is:
Thanks,
Mansi
Hi Mansi,
I'm able to insert IconTabBar inside Row Repeater.
Check this working sample - Plunker - IconTabBar-RowRepeater
Is this you want or something else? Also, please share your code whatever you tried.
Regards,
Sai Vellanki.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sai,
Thanks for the reply.
Yes, this is the thing I want.Just that this icontab bar will be below Platte.
But the problem is for me I am not able to get the icontab bar itself, for me only two lines come.
Below is the code of my view and controller:
Main.view:
<mvc:View
xmlns:l="sap.ui.layout"
xmlns:core="sap.ui.core"
xmlns:mvc="sap.ui.core.mvc"
xmlns:commons="sap.ui.commons"
xmlns="sap.m"
controllerName="demo_1.Main" >
<commons:RowRepeater id="rowrepeater"
>
<Input value="{lastName}" ></Input>
<IconTabBar
id="idIconTabBarNoIcons"
expanded="{device>/isNoPhone}"
class="sapUiResponsiveContentPadding">
<items>
<IconTabFilter
text="Info">
<Text text="Info content goes here ..." />
</IconTabFilter>
<IconTabFilter
text="Attachments">
<Text text="Attachments go here ..." />
</IconTabFilter>
<IconTabFilter
text="Notes">
<Text text="Notes go here ..." />
</IconTabFilter>
<IconTabFilter
text="People">
<Text text="People content goes here ..." />
</IconTabFilter>
</items>
</IconTabBar>
</commons:RowRepeater> |
</mvc:View>
Main.controller
sap.ui.controller("demo_1.Main", {
onInit: function() {
var dataObject = { data : [
{lastName: "Platte", name: "Rudolf", href: "http://www.sap.com", src: "images/persons/male_PlatteR.jpg", gender: "male" , country: "US"},
{lastName: "Dwyer", name: "Nora", href: "http://www.sap.com", src: "images/persons/female_DwyerN.jpg", gender: "female" , country: "US"},
{lastName: "Wallace", name: "Alex", href: "http://www.sap.com", src: "images/persons/male_WallaceA.jpg", gender: "male", country: "DE"},
{lastName: "Wang", name: "Megan", href: "http://www.sap.com", src: "images/persons/female_WangM.jpg", gender: "female", country: "US"},
{lastName: "Ingalls", name: "Barbara", href: "http://www.sap.com", src: "images/persons/female_IngallsB.jpg", gender: "female" , country: "US"},
{lastName: "Wallace", name: "Bruno", href: "http://www.sap.com", src: "images/persons/male_WallaceA.jpg", gender: "male", country: "US"},],
empty:[]
};
var oModel = new sap.ui.model.json.JSONModel();
oModel.setData(dataObject);
sap.ui.getCore().setModel(oModel);
var oRowRepeater = this.getView().byId("rowrepeater");
var oRowTemplate = oRowRepeater.clone();
oRowRepeater.bindRows("/data", oRowTemplate);
},
});
So my output is
I guess my xml view has some problem.
Can u please help with it??
Thanks,
Mansi
Hi Mansi,
Apologies, I missed your response. Just now, I saw it.
Your code looks fine, no problem with it. I copied your code and created a plunk it works fine for me.
Please check the plunk here - Plunker - IconTab-RowRepeater-XML
I have run it on Chrome, Mozilla and IE10 and it works fine. Please check bootstrap, libraries etc in your code.
Regards,
Sai Vellanki.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.