开发者

EL expression can access the son of son object in scope?

Can I use EL expres开发者_StackOverflow社区sion like this ? Topic comes from a requestScope param that is List.

${topic.person.username}

Taking that Topic has a Person and Person has username. I am getting an error telling me that

Property 'username' not found on type br.com.gsc.model.tableMapping.User


It should work fine. The error is just telling that ${topic.person} returns an instance of the br.com.gsc.model.tableMapping.User class which in turn doesn't have a public String getUsername() method. One of those two facts is probably not what you expect. Fix the code accordingly. Perhaps it has to be a different type or the method is indeed missing/incorrect?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜