on 09-28-2011 1:57 PM
A lot of times I don't need the list screen, because only one item is available.
Now I would like to skip the list screen and go to the detailscreen.
I thought to use the api navigateForward(toScreen, listViewKey) for this, but in which method do I have to put this api in the custom.js file and how can I declare that the first row should be displayed in the detail screen.
An example would be appreciated.
Marcel
You could add in something like the following pseudo-code into customBeforeNavigateForward:
if (destScreenKey === "MyListviewScreen")
{
var mvc = getCurrentMessageValueCollection();
var data = mvc.getData("MyListviewKey");
if (data.getValue().length == 0)
{
navigateForward("MyListviewDetailsScreen", data.getValue()[0].getKey());
return false;
}
}
return true;
I haven't tested this, but the principle should be sound.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
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.