no.sesat.search.view.taglib
Class AbstractVelocityTemplateTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.SimpleTagSupport
      extended by no.sesat.search.view.taglib.AbstractVelocityTemplateTag
All Implemented Interfaces:
JspTag, SimpleTag
Direct Known Subclasses:
PublishingPageTag, SearchTabIncludeTag, SearchTabMainTag, VelocityTemplateTag

public abstract class AbstractVelocityTemplateTag
extends SimpleTagSupport

Base class to help with importing velocity templates.

Version:
$Id: AbstractVelocityTemplateTag.java 7225 2009-04-09 00:32:20Z ssmiweve $

Constructor Summary
AbstractVelocityTemplateTag()
           
 
Method Summary
static SearchTab.Layout findLayout(DataModel datamodel)
          Find the layout that belongs to this model.
protected  SearchTab.Layout findLayout(JspContext cxt)
          Find the layout from the context.
protected  void forwardJsp(String include)
          Forward to the specified jsp.
protected  Site getSiteManually(PageContext cxt)
           
protected  void importJsp(String include)
          Imports the specified jsp.
protected  void importVelocity(String templateName, Map<String,Object> map)
          Imports the specified velocity template.
 
Methods inherited from class javax.servlet.jsp.tagext.SimpleTagSupport
doTag, findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractVelocityTemplateTag

public AbstractVelocityTemplateTag()
Method Detail

findLayout

public static SearchTab.Layout findLayout(DataModel datamodel)
Find the layout that belongs to this model.

Parameters:
datamodel -
Returns:
Layout

findLayout

protected SearchTab.Layout findLayout(JspContext cxt)
Find the layout from the context. If not found in context we look for it in the datamodel and set it in the context.

Parameters:
cxt -
Returns:
Layout

getSiteManually

protected final Site getSiteManually(PageContext cxt)

importJsp

protected final void importJsp(String include)
                        throws JspException
Imports the specified jsp.

Parameters:
include - must contain ".jsp" suffix.
Throws:
IOException
ServletException
JspException

forwardJsp

protected final void forwardJsp(String include)
                         throws JspException
Forward to the specified jsp.

Parameters:
include - must contain ".jsp" suffix.
Throws:
IOException
ServletException
JspException

importVelocity

protected final void importVelocity(String templateName,
                                    Map<String,Object> map)
                             throws JspException
Imports the specified velocity template.

Parameters:
templateName - may or may not contain ".vm" extension.
map - key-value pairs to put into the velocity's context.
Throws:
JspException


Copyright © 2005-2009 Schibsted ASA. All Rights Reserved.