Hi.
I haven't been following the previous entries in this thread, but, in
this example, the easiest solution is to create a method in one's bean
called, for example, getListSize():
public int getListSize() {
return this.getList().size();
}
and then code it in one's JSP as:
<h:outputText value="#{bean.listSize}"/>
The point was that you can't use JSTL functions in JSF method bindings.
True, it means creating another method in one's bean, but it makes the
JSP easier to follow. The code has to be written either way. Using
JSF, it is written in the bean, and it results in more concise and
self-documenting code in the JSP.
Take a look at the previous message in the thread, from Mike Kienenberger.
The discussion is #{editor.load(document)} versus
#{editor.loadCurrentlySelectedDocument}.
In the first version, you have a bit greater part of controller defined
in the JSP page, that's what many people don't like. What I personally
don't like about the second version is that I have to introduce some
additional notions (like "currently selected document") into the model,
even if they logically don't belong there. In the example with "current"
document, my DAO which could be simply used to list documents is
becoming stateful.
Bye.
/lexi