tags:

views:

92

answers:

1

Hello

When I use (1) in my xhtml, I get an error as in (2). How can I access the size of an array in my bean?

(1) A List of objects of a custom class type, accessed through the following h:outputText in a rich:column in a rich:subTable in a rich:dataTable:

<h:outputText value="Info:  #{f.filemask.size()}" />

(2)

Caused by: com.sun.facelets.tag.TagAttributeException: /nodeConfig.xhtml @190,91 value="Info:  #{f.filemask.size()" Error Parsing: Info:  #{f.filemask.size()}
    at com.sun.facelets.tag.TagAttribute.getValueExpression(TagAttribute.java:259)
...
Caused by: org.apache.el.parser.ParseException: Encountered " "(" "( "" at line 1, column 41.
Was expecting one of:
    "}" ...
    "." ...
    "[" ...
    ">" ...
    "gt" ...
    "<" ...
    "lt" ...
    ">=" ...
    "ge" ...
    "<=" ...
    "le" ...
    "==" ...
    "eq" ...
    "!=" ...
    "ne" ...
    "&&" ...
    "and" ...
    "||" ...
    "or" ...
    "*" ...
    "+" ...
    "-" ...
    "/" ...
    "div" ...
    "%" ...
    "mod" ...

Any help greatly appreciated. I cannot seem to find references to using methods like this but this reference reported it working fine

+1  A: 

"Normal" EL does not support this. Possibilities:

  1. Write a getter getFileMaskSize())and access #{f.fileMaskSize}.
  2. Use JBoss EL.
lexicore
I thought you were going to say that. Thanks.
Mark Lewis