org.loom.tags.core
Class RedirectTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.SimpleTagSupport
      extended by org.loom.tags.AbstractTag
          extended by org.loom.tags.core.RedirectTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.DynamicAttributes, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.SimpleTag, LoomTag, ParameterContainer

@Tag(dynamicAttributes=true,
     bodyContent=SCRIPTLESS)
public class RedirectTag
extends AbstractTag
implements ParameterContainer

Redirect the current request This tag is useful for index.jsp pages that will be redirected to some action class. In this case, they should be used alone in an empty jsp page.


Field Summary
 
Fields inherited from class org.loom.tags.AbstractTag
expressionLanguageProxy, loomServletRequestFactory, out, repository, request, response
 
Constructor Summary
RedirectTag()
           
 
Method Summary
 ParameterContainer addParameter(java.lang.String name, java.lang.Object value)
          Adds a parameter to the resulting url
 void doTagImpl()
          The method that must be implemented by the child class
 void setAction(java.lang.String action)
          The action this link points to.
 void setEvent(java.lang.String event)
          The event this link points to.
 void setHash(java.lang.String hash)
          The hash of the url (the fragment after '#')
 void setHref(java.lang.String href)
          The target url.
 void setMapping(java.lang.String mapping)
          The mapping as action.event.
 void setRequest(LoomServletRequest request)
           
 
Methods inherited from class org.loom.tags.AbstractTag
createWriterWrapper, doBody, doBufferedBody, doTag, endTag, evaluateExpression, getActionProperty, getAncestorWithClass, getBufferedBody, getExtendedAttributes, getMessagesRepository, getPageContext, getRequest, getResponse, getScopedAttribute, getWriter, initTag, printParentAttributes, removeScopedAttribute, setDynamicAttribute, setExtendedAttribute, setJspContext, setResponse, setScopedAttribute, setWriter
 
Methods inherited from class javax.servlet.jsp.tagext.SimpleTagSupport
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RedirectTag

public RedirectTag()
Method Detail

setRequest

public void setRequest(LoomServletRequest request)
Overrides:
setRequest in class AbstractTag

doTagImpl

public void doTagImpl()
               throws javax.servlet.jsp.JspException,
                      java.io.IOException
Description copied from class: AbstractTag
The method that must be implemented by the child class

Specified by:
doTagImpl in class AbstractTag
Throws:
javax.servlet.jsp.JspException
java.io.IOException

addParameter

public ParameterContainer addParameter(java.lang.String name,
                                       java.lang.Object value)
Description copied from interface: ParameterContainer
Adds a parameter to the resulting url

Specified by:
addParameter in interface ParameterContainer
Parameters:
name - the name of the parameter
value - the value of the parameter
Returns:
the same instance of ParameterContainer, to allow nested calls.

setAction

@Attribute
public void setAction(java.lang.String action)
The action this link points to. Either this or href must be specified


setEvent

@Attribute
public void setEvent(java.lang.String event)
The event this link points to. If action is specified but event is not, the default event will be assumed. If the action does not define a default event, an exception will be thrown. Either action/event or href must be set.


setMapping

@Attribute
public void setMapping(java.lang.String mapping)
The mapping as action.event. This method is equivalent to setting action and event separately.


setHash

@Attribute
public void setHash(java.lang.String hash)
The hash of the url (the fragment after '#')


setHref

@Attribute
public void setHref(java.lang.String href)
The target url. Either this or the action / event pair must be set.