Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-3848

FunctionMapper not found when using a function inside value of f:setPropertyActionListener

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.14
    • 2.0.22, 2.1.16, 2.2.4
    • None
    • None

    Description

      Using f:setPropertyActionListener inside a composite component with the value pointing to a function generates the following exception:

      javax.el.ELException - Expression uses functions, but no FunctionMapper was provided.
      at com.sun.el.lang.ExpressionBuilder.visit(ExpressionBuilder.java:208)

      The following information can be used to reproduce the problem.

      myfacesTest1.xhtml

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <ui:composition
      xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:fn="http://java.sun.com/jsp/jstl/functions"
      xmlns:t="http://java.sun.com/jsf/composite/test">

      <t:area>
      <f:facet name="body">
      <h:commandButton>
      <f:setPropertyActionListener target="#

      {myfacesTest1.property}

      " value="#

      {fn:substring('Hello World!', 6, 12)}

      " />
      </h:commandButton>
      </f:facet>
      </t:area>
      </ui:composition>

      MyfacesTest1.java

      import javax.faces.bean.ManagedBean;
      import javax.faces.bean.SessionScoped;

      @ManagedBean(name = "myfacesTest1")
      @SessionScoped
      public class MyfacesTest1 {

      private String property;

      public String getProperty()

      { return property; }

      public void setProperty(String property)

      { this.property = property; }

      }

      area.xhtml

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:composite="http://java.sun.com/jsf/composite">

      <composite:interface>
      <composite:facet name="body" required="true" />
      </composite:interface>

      <composite:implementation>
      <composite:renderFacet name="body" />
      </composite:implementation>
      </html>

      Attachments

        Activity

          People

            lu4242 Leonardo Uribe
            gmanuel Gonçalo Manuel Cruchinho
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: