How to display value of List#size() in JSF EL?
问题 I'd like to know if there's a way to bind the returned value of a method into a JSF component. I'll explain myself better. Let's say I have a class like this: public class Document { private List<Attachment> attachments; //getter and setter here } this class is exposed to jsf through a registered managed bean in a property called currentDocument, and used in a jsf this way <h:outputText value="#{myManagedBean.currentDocument.attachment.size}" /> This isn't correct, I know. But what is the