XForms/Slideshow

Motivation
You want to have a region of your page that changes images when the user selects a button.

Method
Store a list of links to the slide images in an instance. Use another instance variable to store the state of the images is currently selected. Use a trigger to update the image number.

Link to XForms Application
Load XForms Application

Discussion
This program has the Next trigger calls the "cycle-next" named event when it is pressed. This event, which is defined in the model, updates the cycle and resets it back to one after the slides are done. After that it instructs the form to recalculate its dependency graph. This updates the visible image.

Note that the output must have a the mediatype set to be image/* for the browser to render the link as an image correctly.

Attribution
This example was created by Chris Wallace and the University of Western England.