Log in Help
Print
Homegatewikicalfdoc 〉 calf.html
 

Calf: User Guide

Contents

1. Introduction

Calf is a server process that does some of what CoW does (but with less bells and whistles) and some other stuff.

2. How to...

2.1. Keep pages up-to-date on a local disk

Set "autogenerate" true on FileTrees -- when a .html that you request is older than the corresponding .yam it will be regenerated.

(For the previous method based on file system notifications see the tag calf-with-jnotify in the SVN repository.)

3. Information for Developers

3.1. Calf as Plugin: Checklist

Things to do in the parent application:

3.2. Providing browsing of a file tree

As a plugin Calf provides two ways for browsing file trees (and for keeping the YAM pages up-to-date): first, there's the a /browse controller and an associated FileTree domain class. (To use this you will need to copy the UrlMappings to the parent application; plugins don't include UrlMappings by default.)

Second, there is a TreeService and a gatewiki: taglib. To use this, first call the service's analyse method for the file or directory you want to browse, then pass the service into your GSP (keyed as treeService), then use these tags as appropriate (the first for .txt or .html files, the second for directories):

<gatewiki:file treeService="${treeService}" \| relPath="..." base="..." />

<gatewiki:dir treeService="${treeService}" showIndex="left\|right\|none\|only" />

(To disallow directory listings use "only".)

There's also a tag for converting YAM in-line (which has no dependency on the TreeService):

<gatewiki:yam>Put your...

...YAM markup here.
</gatewiki:yam>

Including stuff in other controllers/views:

<gatewiki:file relPath="about.html" base="info" /> 

3.3. Misc