A new component window is displayed.
WebObjects Builder creates a variable named aPerson and binds to the repetition's item attribute. aPerson is an aPerson dictionary.
import next.util.*; import next.wo.*; public class Registrants extends Component { ImmutableHashtable aPerson; ImmutableVector myNameList; public void awake() { myNameList = ((Application) application()).manager().registrants(); } public void setAPerson(ImmutableHashtable newPerson) { aPerson = newPerson; } }
In the awake method, Registrants accesses the list of all registered people through the Application object's manager instance variable and assigns it to the myNameList instance variable. This is done in awake so that Registrants retrieves the list before the page is displayed.
setAPerson is invoked when the WORepetition iterates through myNameList. It assigns the aPerson variable to the method's argument.
Note: Be sure to change the declarations of myNameList and aPerson as shown above.
Table of Contents Next Section