You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "Dan Haywood (JIRA)" <ji...@apache.org> on 2015/12/28 15:38:49 UTC

[jira] [Commented] (ISIS-1284) Fails to render a property with compile-time type of Object but returning a value type (eg joda DateTime).

    [ https://issues.apache.org/jira/browse/ISIS-1284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15072760#comment-15072760 ] 

Dan Haywood commented on ISIS-1284:
-----------------------------------

The problem seems to be the property defined as:

{code}
    public Object getRequest() {
        return new DateTime(start);
    }
{code}

This renders fine if defined as:
{code}
    public DateTime getRequestDT() {
        return new DateTime(start);
    }
{code}

and indeed this also renders:
{code}
    public Object getRequestDT() {
        return null;
    }
{code}

as does:
{code}
    public Object getRequestDT() {
        return this;
    }
{code}

However, I also triggered an error using:
{code}
    public Object getRequest() {
        return "foo";
    }
{code}

so I think the issue is that a compile-time type of Object indicates that a reference type will be returned, but then returning a value type such as a String or a DateTime triggers the issue.

Is there a particular reason why the compile time type was defined as Object in this case?

> Fails to render a property with compile-time type of Object but returning a value type (eg joda DateTime).
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: ISIS-1284
>                 URL: https://issues.apache.org/jira/browse/ISIS-1284
>             Project: Isis
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.10.0
>            Reporter: Dan Haywood
>            Assignee: Dan Haywood
>            Priority: Minor
>             Fix For: 1.13.0
>
>
> Was: "Unable to find component with id 'entityIconAndTitle'"
> https://github.com/joerg-rade/myapp110
> see also mailing list thread: http://isis.markmail.org/thread/32umudzsj3p7x7tr



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