Passing parameters to PrimeFaces Star Rating component?

后端 未结 4 471
南旧
南旧 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:47

    I solved it as follows:

    
        
            
            
            
        
    
    

    In my backing bean, I'm able to get the value for contentId as follows:

    Map params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
    int contentId = Integer.parseInt(params.get("contentId"));
    

提交回复
热议问题