Topic outline

  • Zen Mojo: Handling Events and Updating Layouts

    NOTE: Zen Mojo is provided with Caché and Ensemble but is not included with InterSystems IRIS or InterSystems IRIS for Health by default. For creating web pages and UIs, InterSystems recommends using any common third-party frameworks such as AngularJS, React or Vue.js.

    Welcome to Zen-Mojo: Handling Events and Updating Layouts. This course contains two instructional lessons, plus several quiz questions. The videos and simulations in this course are best if viewed full screen.

    This is an entirely hands-on course devoted to event handling and updating the display of a Zen Mojo page in response to user interaction. Starting where the preceding module ended, this module will show how to create a master-detail view that responds to user selections.

    Prerequisite Learning or Experience

    • ISC1007 Zen Mojo for Web-based Applications
    • ISC1011 “Hello Mojo!”: Basic Architecture of a Zen Mojo Application
    • ISC1017 Displaying Collections and Using The Zen Mojo Documentation
    • Learners should have basic experience and familiarity with programming using Caché ObjectScript and Caché Studio. Successful completion of Caché Quickstart tutorial is recommended.

    Note: This module will also include some JavaScript programming, but it will be basic enough that JavaScript programming experience is not a prerequisite.

    Audience  This module is intended for technically focused customers and InterSystems staff who are interested in creating Zen Mojo pages that respond to user actions.

    Learning Objectives  In this course we will review event handling and updating the display of a Zen Mojo page in response to user interaction. By the end of this course, you will be able to:

    • Identify the different Zen Mojo event handling methods and their uses.
    • Describe the roles of keys and values in Zen Mojo event handling.
    • Create event-handling code using the $listview layout object and the onselect() event handler.
    • Describe the role of the document stack in Zen Mojo.
    • Write code to create new documents and push them onto the Zen Mojo document stack in response to user-driven events.

    Duration  45 minutes. 

    Grading Criteria  This course is not graded; quiz questions are provided for self-assessment.

    Resources Needed  Latest version of Caché (2015.1 or above). Caché 2015.1 is the first release to contain Zen Mojo. However, Zen Mojo can be installed on Caché 2013.1 and later. 

    • If you are an InterSystems customer, you can download Zen Mojo add-on kits or Caché 2015.1 from the WRC distribution page and install them on your Caché instance. 
    • If you are not a customer, then you can download Caché 2015.1 from the InterSystems website. It will include Zen Mojo.