Skip to main content


class Demo.ZenService.Zen.WeatherReportForm extends

This Zen page displays an interface to the user who wants a weather report. It shows seven days' worth of static images. When the user clicks the Get Report button, the page calls its showWeather() client method which in turn calls its GetWeatherReport() server method to invoke the Zen Service business service to get the weather. The weather report returns as the output of the GetWeatherReport() method and the display changes accordingly.

This simple demonstration depends on some static values that have already been prepared. The most meaningful values to enter for location are "US" "USA" "UK" "England" "London" "Germany" "France" "Spain" "Mexico" and "Italy". You may enter other locations but will not get very meaningful results.

Method Inventory


parameter APPLICATION = Demo.ZenService.Zen.Application;
Class name of application this page belongs to.
parameter PAGENAME = WeatherReportForm;
Displayed name of this page.


method GetWeatherReport(Location As %String) [ ZenMethod ]
GetWeatherReport() is a server side ZenMethod. It starts processing by invoking the ProcessInput() method of the business service called Zen Service in the production. The output of this call is a message of a particular type, Demo.ZenService.Msg.WeatherReportResponse. GetWeatherReport() inserts the properties of this message into a string which it displays as the HTML-formatted contents of an component that already existed, previously empty, on the Zen page. Each time GetWeatherReport() is called, if there is a new output string, the contents of the component change.
clientmethod showWeather() [ Language = javascript ]
Client method showWeather() is called when the user selects a location from the drop-down list. showWeather() gets the value from the list and sends it as the location argument to be used with server method GetWeatherReport().

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new tab