Reputation: 1638
I have a static method that returns a list of a type. In order for me to get a username from type I have to do the following type.getUser.getUserName
. What's the correct way to get to the username using EL? I tried type.user.userName
, but that didn't work.
Upvotes: 0
Views: 96
Reputation: 7195
The correct EL syntact would be type.user.userName
. That is without the getters.
Upvotes: 0
Reputation: 597106
${type.user.userName}
is the proper way to go. If it "doesn't work" (how exactly it doesn't?), it may be because the user
is null
.
Upvotes: 1