Converter not working for URL Param

Splash Forums PrettyFaces Users Converter not working for URL Param

This topic contains 3 replies, has 2 voices, and was last updated by  Christian Kaltepoth 10 years, 10 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #17896



    I have an issue which looks almost identical to

    I am using myfaces 2.04 and pretty faces 3.2 and I get the following error when trying to do a conversion that is usually handled via a Converter I created. The converter is working/being called in phase 3 when using the normal <h:inputSecret… But when I use the

    EL-injected path parameters I get an error in phase 1 with the cast, which makes sense as it hasn’t been converted yet. Is there a solution to this?

    Caused by: com.ocpsoft.pretty.PrettyException: PrettyFaces: Exception occurred while processing <admin/foo:#{}> for URL </admin/foo/2>
    at com.ocpsoft.pretty.faces.beans.ParameterInjector.injectPathParams(
    at com.ocpsoft.pretty.faces.beans.ParameterInjector.injectParameters(
    at com.ocpsoft.pretty.faces.event.PrettyPhaseListener.afterPhase(
    at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(
    at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(
    ... 36 more
    Caused by: javax.el.ELException: Cannot convert 2 of type class java.lang.String to class com.test.Foo
    at org.apache.el.lang.ELSupport.coerceToType(
    at org.apache.el.ExpressionFactoryImpl.coerceToType(
    at com.ocpsoft.pretty.faces.util.FacesElUtils.setValue(
    at com.ocpsoft.pretty.faces.beans.ParameterInjector.injectPathParams(
    ... 40 more


    Hey Barry,

    PrettyFaces currently doesn’t provide full support for JSF converters to convert path and query parameters. But there is a ticket for this:

    I had a quick look at the code and committed a first patch for this issue. This patch provides support for converters registered by type via faces-config.xml or via @FacesConverter.

    Could you perhaps give the latest builds of 3.2.1-SNAPSHOT a try? You will find all required details on how to use the snapshots here:




    Thanks that worked perfectly


    Great! Thanks for testing it! :)

Viewing 4 posts - 1 through 4 (of 4 total)

The forum ‘PrettyFaces Users’ is closed to new topics and replies.

Comments are closed.