Documentation Archive Developer
Search
Table of Contents Previous Section

Adding a Talent Display Group

The browser you just created is going to display a list of Talent objects. Like a repetition element, a browser has list and item attributes. As the browser moves through its list, the browser sets item to the object at the current index. The Movies application uses a display group to provide the browser with a list of Talent objects, so now you need to create the new display group and a variable to bind to the browser's item attribute.

  1. Use the Add Variable/Method command to create two new instance variables:

    You don't need to add set and get methods for the variables.

  2. Using the Display Group Options panel, assign talentDisplayGroup's entity to Talent.

    Remember that to open the Display Group Options panel, simply
    double-click the talentDisplayGroup variable in the object browser. The icon initially displayed next to the variable indicates that initialization parameters have not yet been set.

  3. Configure talentDisplayGroup to sort its objects alphabetically (ascending) by lastName.

  4. Configure it to fetch on load.

    After you configure talentDisplayGroup, the object browser shows a icon next to the variable.

The Movies application uses a display group to provide Talent objects, but you could fetch the Talent objects from the database without one. Display groups provide a simple way to fetch, insert, update, and delete enterprise objects without writing much, if any, code. To get finer-grained control over these operations, you can work directly with an EditingContext object. An editing context can do everything a display group does and much more, but you have to write more code to use one. For more information, see the EditingContext class specification in the Enterprise Objects Framework Reference.

Table of Contents Next Section