O'Reilly logo

Professional Plone Development: Building robust, content-centric web applications with Plone 3, an open source Content Management System by Martin Aspeli

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

KSS-Enabling Film Ratings

In Chapter 11, we added the ability for users to rate films displayed on the Optilux website. We did so with a viewlet containing a form. This works fine without JavaScript, but it is cumbersome to require a full page reload only to update this one viewlet. Let us therefore look at how we can improve this user experience with KSS.

We will take the following approach:

  • Bind a KSS server-side action to the rating buttons shown in the viewlet. This will be invoked via an asynchronous request.
  • Ensure that the default button behavior (which would cause the form to be submitted and thus the page to be reloaded) is disabled when the KSS handler is in use.
  • In the server-side action handler, rate the film the same way that we did in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required