2.2. Viewing Entities and Collections of Entities

Because the All Employees action takes no arguments, invoking it just returns its results. In this case the action returns a collection (of Employees), and so Wicket Objects renders the collection as a table. If the action had returned a single object, then that would have been rendered instead.

Clicking on one of the links takes us to a page rendering that object, in this case an Employee. There is a form for the entity's properties on the left, and summary details on the right. In this particular case the entity has no collections; we'll see one that does shortly.

In the summary section we an image, a title and the entity actions. All these are rendered directly from a metamodel built by inspecting the entity's class. Just as we can invoke actions on the services, we can also invoke actions on the entities; for example, to view this Employee's Claims with the Claims For,,, action.

As before, this action returns a collection (of Claims) and so is rendered as a table.

Clicking on a link to a Claim again renders the entity. This is rendered in a similar manner to the Employee entity seen earlier. However, the Claim entity also has a collection (of ClaimItems), so these are also rendered.