I have a base class for add/edit pages that is genericized (sp?) to accepts as 
the entity to edit as the activitation context when editing:

        void onActivate(E entity) {
                adding = false;
                this.entity = entity;
        }

        E onPassivate() {
                if (entity == null || entity.getId() == null)
                        return null;
                
                return entity;
        }

The problem is that this isn't supported because tapestry doesn't know at 
runtime what the type is. How have people got around this kind of thing? One 
solution is to have onActivate() be in the subclass and call the one in the 
superclass but that seems artificial and gross. Another solution would be to 
have it accept the id of the entity rather than the entity and the load it by 
id. Any other suggestions?

Dan Adams
Senior Software Engineer
Interactive Factory
p: 617.235.5857


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to