This is an example from the standard WebObjects distribution. It has been coverted to WOPerl.
The Component presents a group of digits. When a user clicks a digit, the display is refreshed to reflect the user's selection.
The Component application is a simple example of using a subcomponent. The subcomponent (or child component) Palette messages the parent component (Main) using a WOAction object. For a more sophisticated example of this concept, see TimeOff, which includes a reusable Calendar component.
Component provides an example of messaging a parent from a child component. This requires coordination between the parent's script and declarations file and the child's script. For a more detailed explanation of how it works in Component, see the comments in the files Main.wos and Palette.wos.