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?
精彩评论