Hi Sam

What exactly do you mean by repository? Do you have to load every entity from another place? in load(), we have the code to load every possible entity in our implementation, for example:

T entity;
if (this.clazz == User.class) {
   entity = userService.load(...);
} else if (this.clazz == Company.class) {
   entity = companyService.load(...);
} else .....

And so on. In the end, the entity is loaded from wherever it is defined for this class...

Matt

Sam Barrow wrote:
Does anybody how to pass a smart EntityModel (link below) to another
page? We use a different repository for each entity type. I can't get it
to work. I have tried storing the repository as a field on the
EntityModel and using an abstract method on EntityModel to retrieve it.

http://wicketinaction.com/2008/09/building-a-smart-entitymodel/

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to