Details
-
Wish
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.13.0
-
None
-
None
Description
Factory Methods should be able to be identified as that.
It could be useful, for example, when executing any action.
For any param of any type, Apache Isis could offer the option to create a new instance by executing an action that both return that type and has been identified as a Factory Method.
An example of defining a Factory Method could be:
class Concert { @Action(factoryMethod=true) public Concert someAction() { return new Concert(); } }
from ISIS-1993:
@Property(createRepository=Supplier.Repository.class, createAction="create")
@Getter @Setter Party supplier;
and
public IncomingInvoice edit( @Parameter(createRepository=Supplier.Repository.class, createAction="create") Party supplier, ... ) { ... }
to invoke a nominated action "in-situ".
This could be bound to a keystroke, eg "F3"
Attachments
Attachments
Issue Links
- contains
-
CAUSEWAY-1993 [Duplicate] Allow factory actions to be associated with both properties and parameters
- Closed
- links to
- mentioned in
-
Page Loading...