sunlabs.brazil.template
Class UrlNavBarTemplate

java.lang.Object
  extended by sunlabs.brazil.template.Template
      extended by sunlabs.brazil.template.UrlNavBarTemplate (view source)
All Implemented Interfaces:
TemplateInterface

public class UrlNavBarTemplate
extends Template

Template class for dynamically generating a navigation bar by looking at portions of the url. Given url: /main/next/last/foo.html generate the request properties for the directories: main, next, and last. The properties will be:

 NAV.main=/main/
 NAV.next=/main/next/ ....
 NAV.=main/next/....
 
These properties may be incorporated into web pages using the BSLTemplate's <foreach> tag, using a delimeter of "/" to iterate over the listings.

The follow request properties are consulted:

prepend
Use as a prefix on the property name, instead of "NAV.".
includeDir
Normally, if the URL refers to the directory ( e.g. it ends with a /), no nav bar entry is generated. If this property is set, the entry is generated.


Field Summary
 
Fields inherited from class sunlabs.brazil.template.Template
debug
 
Constructor Summary
UrlNavBarTemplate()
           
 
Method Summary
 boolean init(RewriteContext hr)
          Compute a set of properties based on the URL
 
Methods inherited from class sunlabs.brazil.template.Template
done
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UrlNavBarTemplate

public UrlNavBarTemplate()
Method Detail

init

public boolean init(RewriteContext hr)
Compute a set of properties based on the URL

Specified by:
init in interface TemplateInterface
Overrides:
init in class Template

Version Kenai-svn-r24, Generated 08/18/09
Copyright (c) 2001-2009, Sun Microsystems.