Skip to end of metadata
Go to start of metadata

Version status: 0.0.3 beta

Icon

Depends on tapestry-jpa and tapestry-ckeditor modules

Overview

Editablecontent module was born out of the recurring need to modify specific textual segments. Most websites have "about", "privacy policy", "what's new" etc. pages that contain largely textual content that is changed infrequently and often separate or after product updates. Using a traditional, full-blown CMS for modifying the content is often too cumbersome, as the CMS may not offer a suitable data API for pulling the content out, the resource links (images etc.) may need to modified, the CMS doesn't offer good enough performance for high volume read operations and/or the caches remain in stale state for too long. The answer is to modify the content on-line and in-place, backed by a database of your choice. The editablecontent component allows you to simply surround a possibly existing static text on a html page and make it editable with the right permissions, automatically storing the edited contents in the database, with localization support!

Here's how it looks like:

When user is unauthenticatedContent is being edited

When authenticated with the configured editor role

Usage

An example page template:

Configuration

The module doesn't require any mandatory configuration.

There are only a few configuration options for which the module provides reasonable defaults:

The module uses HttpServletRequest.getRemoteUser() and HttpServletRequest.isUserInRole(String role) for permission checks. Tapestry-security provides a built-in wrapper for handling these operations, but you don't have to use tapestry-security with this module, instead you could easily provide your own advisor for HttpservletRequest if you like. The module also keeps track of versions, however at the moment, there's no user interface for reverting to previous versions. Currently, JPA is the only persistence strategy implemented. For configuring JPA, see "Integrating with JPA", of Tapestry 5 documentation.

  • No labels