Passing parameters to PrimeFaces Star Rating component?

后端 未结 4 490
南旧
南旧 2021-01-12 06:16

I\'m trying to make use of the Star Rating component from PrimeFaces. However, it does not allow you to pass in parameters. That makes it impossible for me to do a lookup

4条回答
  •  长发绾君心
    2021-01-12 06:52

    have you tried to use f:setPropertyActionListener in your button so that you can send any parameter you want to your action class? or you have to do it inside the p:rating?

    or you can do something like

    private Rating rating;

    //getter -setter

    and in your action bean, you can access this value ((UIParameter)rating.getChildren().get(0)).getValue();

    if this is the case, you may be doing sth wrong as this shouldn't be the case while you are using JSF.

    just my two cents...

提交回复
热议问题