You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Mike Kienenberger <mk...@gmail.com> on 2005/05/24 23:34:10 UTC

ReferenceSyntaxException: Functions not supported in expressions

I was trying to figure out how to get the size of a java.util.List in
JSF el, and the only thing I could find was to use a jsp function.  
However, doing so generates:

Caused by: javax.faces.el.ReferenceSyntaxException: Functions not
supported in expressions. Function: jstl_function:length

ValueBindingImpl contains the following comment and implementation.  
Is this just work waiting to be accomplished?   Or is there some
deeper reason for why MyFaces JSF EL doesn't support functions?

If it's the former, I'll take a crack at it, I guess.

-Mike

========================================================
    /**
     * To implement function support, subclass and use a static 
     * initialization block to assign your own function mapper
     */
    protected static FunctionMapper s_functionMapper = new FunctionMapper()
        {
            public Method resolveFunction(String prefix, String localName)
            {
                throw new ReferenceSyntaxException(
                    "Functions not supported in expressions. Function: " 
                    + prefix + ":" + localName);
            }
        };
========================================================