Skip to content

[Play 2.5 (Java)] Accessing template object with Class that implements an interface  #115

Open
@danielmorozoff

Description

I have not investigated this very far, but I am receiving compilation errors attempting to access variables set in an interface of an object I pass to a template. Written up example below. Has anyone else seen this issue?

interface AInterface{
   String foo="foo";
}
class superA{
   String superBar="superBar";
}
class A extends superA implements AInterface{
   String bar = "bar";
}

----Inside template-----

@(someVar:A)
This works fine for 'bar': @(someVar.bar)
And this works fine for 'superBar': @(someVar.superBar)

[Compilation error: value name is not a member of class] 
But for 'foo': @(someVar.foo) 

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions