Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Alfresco One 5.x Developer???s Guide

You're reading from   Alfresco One 5.x Developer???s Guide Discover what it means to be an expert developer by exploring the latest features available to you in Alfresco One 5.x

Arrow left icon
Product type Paperback
Published in Feb 2017
Publisher Packt
ISBN-13 9781787128163
Length 528 pages
Edition 2nd Edition
Languages
Concepts
Arrow right icon
Authors (2):
Arrow left icon
Benjamin Chevallereau Benjamin Chevallereau
Author Profile Icon Benjamin Chevallereau
Benjamin Chevallereau
Jeff Potts Jeff Potts
Author Profile Icon Jeff Potts
Jeff Potts
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. The Alfresco Platform FREE CHAPTER 2. Getting Started with Alfresco 3. Working with Content Models 4. Handling Content Automatically with Actions, Behaviors, Transformers, and Extractors 5. Customizing Alfresco Share 6. Creating an Angular Application 7. Exposing Content through a RESTful API with Web Scripts 8. Advanced Workflow 9. Amazing Extensions 10. Security

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 widget so that the POST can be tested. The following figure shows what the response will look like when you are done. This example whitepaper node has 2 ratings and an average rating of 3:

The purpose of the rating widget is two-fold. First, it graphically...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime