UpviseJS : Next Previous Navigation

Download Next/Previous Sample

When you display a long list of items, it is often usfull to allow the user go directly to the next or previous item while in the View item screen, instead of going bakc and tappping the next item.

You can easily add next / previous buttons in the toolbar of the view item screen by using the Toolbar.setStyle("nextprevious") .


function showList() {
    List.bindItems("Contacts.contacts", "name", "viewContact(this.id)");   
    List.show();
}

function viewContact(id) {
    Toolbar.setStyle("nextprevious");
    var contact = Query.selectId("Contacts.contacts", id);
    List.addContactTitle(contact.name);
    List.show();
}