Dan Haywood created ISIS-992:
--------------------------------
Summary: Extend Isis metamodel and Wicket viewer so that a
"delete" action can be automatically provided for deleteable objects.
Key: ISIS-992
URL: https://issues.apache.org/jira/browse/ISIS-992
Project: Isis
Issue Type: New Feature
Components: Core, Viewer: Wicket
Affects Versions: core-1.7.0, viewer-wicket-1.7.0
Reporter: Dan Haywood
Assignee: Dan Haywood
Fix For: viewer-wicket-2.0.0, core-2.0.0
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.
[1] http://isis.markmail.org/thread/jdylmfxrzdryhrlq
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)