Class AbstractTagProxy<T extends javax.servlet.jsp.tagext.JspTag>
- java.lang.Object
-
- org.shredzone.commons.taglib.proxy.AbstractTagProxy<T>
-
- Type Parameters:
T
- Type of theJspTag
this proxy delegates to
- All Implemented Interfaces:
javax.servlet.jsp.tagext.JspTag
,ProxiedTag<T>
- Direct Known Subclasses:
SimpleTagProxy
,TagProxy
public abstract class AbstractTagProxy<T extends javax.servlet.jsp.tagext.JspTag> extends Object implements javax.servlet.jsp.tagext.JspTag, ProxiedTag<T>
An abstract TagProxy implementation that offers all basic methods.- Author:
- Richard "Shred" Körber
-
-
Field Summary
Fields Modifier and Type Field Description static String
TAGPROXY_BEANFACTORY_CACHE
-
Constructor Summary
Constructors Constructor Description AbstractTagProxy()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected org.springframework.beans.factory.BeanFactory
getBeanFactory(javax.servlet.jsp.JspContext jspContext)
Gets theBeanFactory
from the givenJspContext
.protected abstract String
getBeanName()
T
getTargetBean()
Returns a reference to the target bean this proxy delegates to.protected void
initTargetBean(javax.servlet.jsp.JspContext jspContext)
Creates a new instance of the implementing target bean.
-
-
-
Field Detail
-
TAGPROXY_BEANFACTORY_CACHE
public static final String TAGPROXY_BEANFACTORY_CACHE
-
-
Constructor Detail
-
AbstractTagProxy
public AbstractTagProxy()
-
-
Method Detail
-
getBeanName
protected abstract String getBeanName()
-
initTargetBean
protected void initTargetBean(@Nonnull javax.servlet.jsp.JspContext jspContext)
Creates a new instance of the implementing target bean.- Parameters:
jspContext
-JspContext
-
getBeanFactory
@Nonnull protected org.springframework.beans.factory.BeanFactory getBeanFactory(@Nonnull javax.servlet.jsp.JspContext jspContext)
Gets theBeanFactory
from the givenJspContext
. The default implementation automagically finds aBeanFactory
that was previously set by aFrameworkServlet
. The result is cached.- Parameters:
jspContext
-JspContext
to be used- Returns:
BeanFactory
found
-
getTargetBean
public T getTargetBean()
Description copied from interface:ProxiedTag
Returns a reference to the target bean this proxy delegates to.- Specified by:
getTargetBean
in interfaceProxiedTag<T extends javax.servlet.jsp.tagext.JspTag>
- Returns:
- Target bean
-
-