Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
danielmorozoff opened this issue Aug 20, 2016 · 0 comments

Comments

@danielmorozoff
Copy link

danielmorozoff commented Aug 20, 2016

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) 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants