Wiring a web script to UI widgets

SomeCo wants to show a graphical ratings widget on its web page. When the user clicks a star, it should post the corresponding rating to Alfresco. In a subsequent example, you'll see how to leverage the widget on SomeCo's website. For this example, you are going to add the ratings widget to the HTML response for the rating web script. That will let you test both the widget and the rating POST.

Note

We'll use jQuery in our HTML page. For the ratings widget, it is based on code from the library at http://rateyo.fundoocode.ninja/.

You may recall that in the earlier rating example, the HTML response simply showed the rating summary data for a given whitepaper. The goal now is to enhance that response with the rating ...

Get Alfresco One 5.x Developer's Guide - second edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.