This Mixin is used to call a jquery plugin "raty" that will provide rendered stars for different uses:
- In a form: You can call the mixin in a Textfield or a Select, it will replace the input with a list of stars to rate.
To use it, call the component with '<input type="text" t:type="textfield/select" t:id="RatyId" t:mixins="kawwa2/raty"/>'.
- In a division: You can call the mixin in a division to display a result.
To use it, call the component with '<p t:type="any" t:mixins="kawwa2/raty">Any text you want to display</p>'.
There is optionnal parameters to call:
- t:ratyOptions="<<!>>" ==> Replace <<!>> by the JSONObject containing the options you want to pass onto the JQuery plugin "raty" used for the rate. This object will overide any conflicting raty configuration generated by other tapestry parameters.
- t:ratyRates="<<!>>" ==> Replace <<!>> by the list of rates you want to be displayed/available. The SelectModel values must start from (0 if you want the possiblity of no rate or 1) and increase its value by 1 for each rate in case of an input to synchronize both.
- t:ratyValue="<<!>>" ==> Replace <<!>> by the value want to be setted for the raty plugin.
- t:ratyStarOn="<<!>>" ==> Replace <<!>> by the asset containing the image you want to be displayed for an active star icon.
- t:ratyStarOff="<<!>>" ==> Replace <<!>> by the asset containing the image you want to be displayed for an inactive star icon.
- t:ratyCancelOn="<<!>>" ==> Replace <<!>> by the asset containing the image you want to be displayed for an active cancel icon.
- t:ratyCancelOff="<<!>>" ==> Replace <<!>> by the asset containing the image you want to be displayed for an inactive cancel icon.
- t:ratyLocation="<<!>>" ==> Replace <<!>> by the string containing the literal ("before" or "after") expression for the relative location of the Raty mixin refering to the input.