[jboss-user] [JBoss Seam] - Re: how do i get the size of collection in .xhtml with facel
lindsayh
do-not-reply at jboss.com
Thu Apr 26 08:19:46 EDT 2007
"petemuir" wrote : Seam intercepts EL calls and adds in a size property for Collections, Map and DataModel. Does this work if your EL expression is #{myCollection.size}?
I think these EL resolvers only work for JSF 1.2.
After having difficulty getting my app to work with JSF 1.2, I just use the JSTL length funtion to get a collection size when I need to:
Here's my namespace declaration:
| <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:s="http://jboss.com/products/seam/taglib"
| ...
| xmlns:jstlfn="http://java.sun.com/jsp/jstl/functions"
| ...
|
and here's how I use the length function in a table:
| <rich:column>
| <f:facet name="header">
| No. of Users
| </f:facet>
| #{jstlfn:length(userGroup.users)}
| </rich:column>
|
I got this tip from someone else.
Lindsay
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4040937#4040937
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4040937
More information about the jboss-user
mailing list