on 09-30-2013 8:41 AM
Hi
I'm trying to make my hybrid web container app move to the next view/page when a button is clicked. I have had a look at some sample code as follows -
This is inside the sample controller.js file -
productListTap : function(evt) {
var data = {};
data.context = evt.getSource().getBindingContext();
var app = this.getView().app;
app.to("ProductDetail", data);
},
This is my controller code -
moveToNextViewTap : function(evt)
{
var app = this.getView().app;
app.to("EndView");
},
I have debugged this in chrome and find that my 'app' variable is undefined and therefore does not do anything. I cant figure out why though.
What is missing?
Regards
Riaz
Hi Riaz,
It's pretty hard to help you with so few lines of code. It seems like your variable "app" has never been initialized, so I guess you should do it somewhere, mainly in the init method of your controller. In this case, you ensure your variable has been set when moveToNextViewTap handler is called.
Anyway, if you look at the rest of your sample code, this variable must have been initialized somewhere.
If you need more help, please post more of your code, so we can help you more efficiently
Regards,
Jerome
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.