Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
viewer-wicket-1.7.0, core-1.7.0
-
None
Description
per [1],
@DomainObject(
deleteable=true
...
)
public class MyClass
could be used to automatically generate a delete() action:
public void delete(Entity entity) {
this.getContainer().remove(entity);
this.getContainer().flush();
}
~~~~
However, there are some things that need to be thought through here. For an explicitly coded action there would be all the annotations/metadata in @Action and @ActionLayout. Where would that information be specified if the action is synthesized on the fly? Would the @DomainObject annotation need to be extended instead as, for example:
@DomainObject(
deleteAction=@Action(...),
...
)
I'm not completely convinced the extra complexity is worth it to save four lines of code.