javax.faces.FacesException: Expression Error: Named Object: player not found

后端 未结 1 2058
孤城傲影
孤城傲影 2021-02-08 14:30

I am trying to learn pickList from Primefaces. What I have jsf file, PickListBean.java and Player.java.

When I run the project, I get error as http://code.google.c

相关标签:
1条回答
  • 2021-02-08 14:57

    It's basically telling that the JSF Converter with the ID "player" cannot be found. It's been referenced as <p:pickList converter="player">.

    With the given code, you need to register the PlayerConverter as follows in faces-config.xml.

    <converter>
        <converter-id>player</converter-id>
        <converter-class>org.primefaces.examples.view.PlayerConverter</converter-class>
    </converter>
    

    Alternatively, you could edit the PlayerConverter class to add the annotation

    @FacesConverter("player")
    

    on the class.

    0 讨论(0)
提交回复
热议问题