on 02-22-2016 10:05 AM
Hi Experts,
I am using sap.m.table in my ui5 application and in that i am using selectionchange event which will navigate to another screen on click of table data (I am using columListItem and bind aggregation for binding).
The problem i am facing is when i come back to main screen and click on the table data again i am not able navigate to the screen again. I am using routing mechanism for navigating from one screen to another.
Kindly assist.
Hello Varun,
Based on the description written above,
I feel the logic of your code is as below (please spare me for formatting errors)
SelectionChange:function(event){
var view = create new view with id 1 //********step 1
navigate to view with id 1
}
when you click first time on table row, it creates view with id 1 and navigate correctly.
Now agai nyou come back to previous view and again click on table row.
This time it tries to create view with same id again. which is causing error and you are not bale to navigate.
chekc F12 debugging tools, You cna see teh console error.
to avoid this use below logic
var page2 = null;
page2 = sap.ui.getCore().byId("id1");
if(page2 != null){
}
else{
page2 = sap.ui.view({id:"id`", viewName:"demo.test", type:sap.ui.core.mvc.ViewType.JS});
app.addPage(page2);
}
app.to(page2);
feel free to let me know in case your issue is different.
Regards,
Ajinkya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Varun,
What is the problem for not being able to navigate again? Any error or something? Post your code please.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.