Andi Huber created CAUSEWAY-3585:
------------------------------------

             Summary: [Metamodel] Allow for Types that subclass an Entity Type 
to actually be a Viewmodel.
                 Key: CAUSEWAY-3585
                 URL: https://issues.apache.org/jira/browse/CAUSEWAY-3585
             Project: Causeway
          Issue Type: Improvement
          Components: Core
            Reporter: Andi Huber
            Assignee: Andi Huber
             Fix For: 2.0.0-RC3


For an entity relation where the looked up entity does not exist, there are 3 
possible ways to handle this:
(1) fail
(2) consider the looked up entity as not strictly required to be resolvable and 
render a (none) badge
(3) render a pseudo entity, that has the information, which primary or 
secondary lookup key could not be resolved and perhaps render in a 
different/warning color say

Re (3) such a pseudo entity needs to be bookmarkable, hence would be 
appropriate to implement as viewmodel.


{code:java}
class MyEntityNotFound extends MyEntity implements ViewModel {
    public MyEntityNotFound (final String memento) { setName(memento); }
    @Override public String viewModelMemento() { return getName(); }
}
{code}







--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to