net.sf.springlayout.web.layout.taglib
Class SwapCommandObjectTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by org.springframework.web.servlet.tags.RequestContextAwareTag
          extended by net.sf.springlayout.web.layout.taglib.SwapCommandObjectTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.Tag, javax.servlet.jsp.tagext.TryCatchFinally

public class SwapCommandObjectTag
extends org.springframework.web.servlet.tags.RequestContextAwareTag

Used to swap the command object in the request with that supplied by the getCommandObject method of the supplied controller. Written specifically to swap the command object when combining many pages from a MultiPanelFormController into one (Ie, print all panels) when the command object is of different type for one or more of the controllers for each panel. Use inline within the page to swap the command object as the page renders.

Author:
rob monie
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.springframework.web.servlet.tags.RequestContextAwareTag
logger, REQUEST_CONTEXT_PAGE_ATTRIBUTE
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
SwapCommandObjectTag()
           
 
Method Summary
protected  int doStartTagInternal()
           
 void setControllerBeanName(java.lang.String controllerBeanName)
          Sets the name of the controller bean that should return the command object for use in the jsp.
 
Methods inherited from class org.springframework.web.servlet.tags.RequestContextAwareTag
doCatch, doFinally, doStartTag, getRequestContext
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwapCommandObjectTag

public SwapCommandObjectTag()
Method Detail

setControllerBeanName

public void setControllerBeanName(java.lang.String controllerBeanName)
Sets the name of the controller bean that should return the command object for use in the jsp.

Parameters:
controllerBeanName -

doStartTagInternal

protected int doStartTagInternal()
                          throws java.lang.Exception
Specified by:
doStartTagInternal in class org.springframework.web.servlet.tags.RequestContextAwareTag
Throws:
java.lang.Exception


Copyright © 2005-2007 Spring Layout Team. All Rights Reserved.