rating component can only be bound to java.lang.Double

UI Components for JSF
Post Reply
mozvip
Posts: 7
Joined: 27 Sep 2009, 16:29

11 Apr 2010, 19:48

Hi,

I tried to bound the p:rating component to an Integer attribute, and got the following error:

Code: Select all

Caused by: javax.faces.FacesException: Rating component('listEmployeeSkillsId:0:levelRowId')'s value must be of type java.lang.Double
	at org.primefaces.component.rating.RatingRenderer.encodeMarkup(RatingRenderer.java:101)
	at org.primefaces.component.rating.RatingRenderer.encodeEnd(RatingRenderer.java:66)
Can this be fixed ? Binding a star rating to an Integer value seems more "natural" to me. I don't want to change the type of my model attributes just to please the component. Do you think I can find a solution using a converter ?

Thanks, and please keep up the great work with Primefaces.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

12 Apr 2010, 01:10

Hi,

We made it a double because we'll add half and quarter star rating support soon in future to allow values like 2,5, 2.25 and more.

michalo
Posts: 1
Joined: 24 Aug 2011, 20:10

24 Aug 2011, 20:16

Hi,

Do you know when hal, quarter etc start will available (maybe 3.0.M3) ?

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 20 guests