on 07-25-2014 12:41 PM
Hi All,
I did the AppBuilder superlist appilcation from this reference AppBuilder: Create the Northwind App with a SuperList component - YouTube
It is showing the data in list view, when i clicked on particular item it is navigating to the details view of that particular item.
Now I am unable to get back from the details view to Main list view.
for that I wrote the follwing code, but it does not effect the application
backButtonTap: function(evt) {
var oCore = sap.ui.getCore();
var sl = this.byId("SuperList1");
var page = oCore.byId("appView").byId("HomePageView").byId("HomePage");
sl.drillBack();
if (sl.getCurrentLevel()===0){
page.setTitle("SapData");
page.setShowNavButton(false);
}
else {
page.setShowNavButton(true);
}
},
myRowFocusChanged: function(evt) {
var oCore = sap.ui.getCore();
var sl = this.byId("SuperList1");
var page = oCore.byId("appView").byId("HomePageView").byId("HomePage");
var data = sl.getRow(evt.mParameters.row);
var title = data[0];
sl.drillDown(evt.mParameters.row);
if (sl.getCurrentLevel()>0){
page.setTitle(title);
page.setShowNavButton(true);
}
}
Is any issue with my code?
Thanks,
Sravanya
Hi sravanya,
can you mention the code in btn-onTap function .
also can you try removing var oCore = sap.ui.getCore(); in function(evt) changing
if (sl.getCurrentLevel()===0){
to
if (sl.getCurrentLevel()==0){
regards
Virinchy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sravnaya,
There was a similar issue in page navigation at and was resolved with the below code . please check if it might work.
backButtonTap: function(evt) { | ||
try | ||
{var s1 = this.byId("SuperList1"); |
var page = sap.ui.getCore().byId("appView").byId("homePageView").byId("homePage");
s1.drillBack();
if (s1.getCurrentLevel()===0){
page.setTitle("Northwind Sample");
page.setShowNavButton(false); |
}
else {
appView.setShowNavButton(true);
}
}catch(e) | |||||
{ | |||||
alert(e); | |||||
} | |||||
}, |
myRowFocusChanged: function(evt) { | ||
try{ | ||
var s1 = this.byId("SuperList1"); |
var page = sap.ui.getCore().byId("appView").byId("homePageView").byId("homePage");
// alert('test1');
var data = s1.getRow(evt.mParameters.row);
// alert('test2');
var title = data[4]+ ' ' +data[2]+ ' ' +data[1]; |
// alert('test3');
s1.drillDown(evt.mParameters.row);
if (s1.getCurrentLevel()>0){
// alert('test4' + title); |
page.setTitle(title);
// alert('test5');
page.setShowNavButton(true);
}
}catch(e){ | |||
alert(e); | |||
} | |||
} |
Regards
Virinchy
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.