Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Clicking on the Fetch Data button with the mouse, or pressing the spacebar space-bar, will update the view with new data.

...

As you will see in the code below(in a later section), we created a key-binding with the space-bar (to fetch data); it is thus listed in the quick help panel.

Also of note, : pressing the T key will toggle the "theme" between light and dark:

...

This is the base Application class and may be used for non-UI related functionality (not addressed in this tutorial). 

AppUiComponent

This is the the base class for UI functionality. The salient features to note are introduced briefly below.

...

In this simple example, we only have to deal with a single event type, but this is where others other event type handlers would be declared if our view generated additional events.

...

Note that this class extends RequestHandler, which defines an abstract process() method to be implemented by subclasses.

The constructor takes the name of the event to be handled; at run time, an instance of this handler is bound to the event name, and the process() method invoked each time such an event is received from the client.

 

(3) implement process() method:

...

Info

The payload parameter provides the payload of the request event, but we are not using it in this sample code.example

The method creates and populates an ObjectNode instance with data to be (transformed into JSON and) shipped off back to the client.

...