Extjs rating extension
Lately i was playing with extjs and i created an extension for rating. The extension itself has 2 components. The first one is the visual one. It’s a kind of slider with some modifications. It’s usage is the same as a slider’s. The second component is a form field that holds the value of the first one in a hidden input flield. The input element takes an extra parameter called starConfig and this parameter is passed to the constructor of the first component.
The number of stars is calculated dynamically and it’s equal to maxValue/increment
for example
1 2 3 4 5 | { minValue: 0, maxValue: 100 increment: 10 } |
This will give us 10 stars and each star increases the value of the hidden field by 10. By default increment = 1 and maxValue = 5
October 22nd, 2008 at 3:37 pm
This was a clever way to implement this. Very cool!
However, why did you choose to copy and paste all of the Ext.Slider code and subclass Ext.BoxComponent rather than subclass Ext.slider itself?
Please make sure that you post a link in the User Extensions and Plugins as I’m sure other users would certainly like this as well.
Aaron Conran
Ext JS Core Developer
October 23rd, 2008 at 1:15 pm
Well this was my first extension
I haven’t got so much experience with extjs in moment I wrote this. If I have to rewrite it (may be soon) I’ll extend Ext.slider.
October 23rd, 2008 at 1:18 pm
By the way there is a post in Ext forum here.
September 23rd, 2009 at 12:00 pm
How can I make work setValue on this extension?
Thanks in advance,