Flex 2.0.1 Rating Component
April 28, 2007
Allot of online applications today presenting anything from news, to photos, to video all have a public rating feature. So here is a component that can serve as a really good start.
Originally shown as a sample in the Primitive Explorer I thought I’d break it out of that and into a post of it’s own. Mostly because as one could understand, not everyone is interested in primitives, and I’d hate to see someone reinvent code that is available.

So working off some of the work done in the Primitive Explorer I built this sample rating component. There are similar classes in this component as in the primitive explorer and I’ve made no effort to trim them down to only the necessary code. They are part of a larger package and I thought it best to keep them in tact as to not cause confusion for later updates to either. So everything in com.Primitives is part of that earlier work.
The Flex 2.0.1 Rating component can be used either stand alone or as an itemRenderer. Support for all styles listed in the PrimitiveStyles.as. Tooltips are set as an array using the tooltips property. You could create a 1-10 star rating by changing the private itemCount variable (I haven’t tried that). 5 stars is the default. If your using it in a datagrid as an itemRenderer the editorDataField should be set to “value”.
Sample and Source : Rating Component
Enjoy.
Jason Hawryluk
May 11, 2007 at 6:10 pm
Oh no, the source is a dead link!!! was really hoping to try the example.
May 11, 2007 at 6:30 pm
TimG,
Sorry for that but the server seems to be down.
It happens every now and then (beyond my control).
Try back a little later.
jason
July 16, 2007 at 3:25 pm
[...] for the Springgraph component, Doug McCune for the SuperTabNavigator, and Jason Hawryluk for the Flex Rating Component used in this [...]
February 4, 2008 at 1:03 am
Hey jason, sorry but I can’t seem to find the link for the source code? I only see the sample. I must be dense.
Anyway, it’s a really good component and I’ll like to adapt it for a school project I’m working on. Great work!
February 4, 2008 at 1:11 am
Ohh. Nevermind, I got it. Right click! Now I’m ashamed.
February 17, 2008 at 2:28 pm
I’m trying to use the rating component as a filter for selecting videos in a product selector. Nevertheless, I constantly get the warning “Data binding will not be able to detect assignments to value”. The initial value is used and any other value which is dynamically changed by the user is not taken into account. Anyone knows what this causes and what the solution will be?