Handling form data

The rating example makes an AJAX call using the POST method. What if, instead of using AJAX, you were simply posting an HTML form? The web script framework is able to handle form posts, including multi-part forms.

For example, let's implement a new HelloWorld example as a form post instead of passing the name argument in the query string. We can use a static HTML page to render the form, but for the cost of an extra descriptor let's use a web script for both the GET (to render the form) and the POST (to process the form data). To do this, you'll need two descriptors (one for GET and one for POST), two FreeMarker templates, and a JavaScript controller.

Step-by-step - implementing a form-based Hello World

To create a new version ...

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.