You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2015/03/26 20:26:53 UTC

[jira] [Created] (ISIS-1117) Allow using "marker" view models

Martin Grigorov created ISIS-1117:
-------------------------------------

             Summary: Allow using "marker" view models
                 Key: ISIS-1117
                 URL: https://issues.apache.org/jira/browse/ISIS-1117
             Project: Isis
          Issue Type: Improvement
          Components: Core: Viewer: Wicket
    Affects Versions: core-1.8.0
            Reporter: Martin Grigorov
            Assignee: Dan Haywood
            Priority: Trivial


>From users@ mailing lists: http://markmail.org/message/nbkj3jkbmr6tjghk

I tried to use a "marker" view model, i.e. a view model without any
properties.
I need it to trigger instantiation of a custom component(factory).
I thought that I may put all the "properties" in the component, so the view
model won't need to have them. It will be just a marker, like marker
interfaces.
This didn't work because of the code at
https://github.com/apache/isis/blob/master/core/viewer-wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java#L124
I will put the properties in the view model to overcome this check.
Is this something that could be relaxed or this check has to stay there for
some other functionality ?

{code}
if(*!specification.isViewModel() && *visibleAssociation.isEmpty()) {
{code}

seems to work fine with marker view model




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)