Accessing bean object methods from xhtml in RichFaces

Posted by Mark Lewis on Stack Overflow See other posts from Stack Overflow or by Mark Lewis
Published on 2010-04-15T11:30:02Z Indexed on 2010/04/15 11:33 UTC
Read the original article Hit count: 485

Filed under:
|
|

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

© Stack Overflow or respective owner

Related posts about java

Related posts about richfaces