O'Reilly logo

Alfresco 3 Web Content Management by Vinita Choudhary, Pallika Majmudar, Amita Bhandari, Munwar Shariff

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

Web script for getting the details of a particular news item

Now let's look at the web script changes for this. In this example, we will see how we can fetch the details of an individual news item.

Description document

The description document, getNewsItem.get.desc.xml, will be the same as used in the previous example.

Java-backed Bean for web scripts

We use the same Java Bean class, GetNewsItem, which extends the DeclarativeWebScript class, but we will modify this class as follows:

  1. Render the intermediate template model (getNewsItem.get.html.model.ftl) with the renderTemplate method of template service as:
    renderTemplate(templatePath, map, out);
    

    where templatePath is the path for the filegetNewsItem.get.html.model.ftl, map is the model map of the ...

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