public class IncludeContentSectionFactory extends AbstractJspActionFactory<SectionAction>
The current JspContext
is stored as a ServletRequest
attribute
with key JspContext.ATTRIBUTE_KEY
. If the included page is a JSP page it
can get the JspContext by calling
request.getAttribute(JspContext.ATTRIBUTE_KEY)
.
Use the AbstractJspFactory.setScript(String)
and AbstractJspFactory.setStylesheet(String)
methods.
Each call to these methods will add the argument to a set. Use
the AbstractJspFactory.getScripts()
and AbstractJspFactory.getStylesheets()
methods to gain
access to the sets, for example, to remove added items.
Note that this factory will accept and generate content for all nodes (including
folder nodes). If only some nodes should be used, the factory should be subclassed
and override the AbstractJspActionFactory.prepareContext(InvokationContext)
method.
Modifier and Type | Class and Description |
---|---|
(package private) class |
IncludeContentSectionFactory.Section |
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
contentStyle |
private java.lang.String |
hideClazz |
private java.lang.String |
id |
private java.lang.String |
include |
private java.lang.String |
showClazz |
private java.lang.String |
style |
private java.lang.String |
title |
Constructor and Description |
---|
IncludeContentSectionFactory()
Create a new factory instance.
|
Modifier and Type | Method and Description |
---|---|
SectionAction[] |
getActions(InvokationContext<? super SectionAction> context)
This method may be called one or several times for each request.
|
void |
setContentStyle(java.lang.String contentStyle) |
void |
setHideClazz(java.lang.String hideClazz) |
void |
setId(java.lang.String id) |
void |
setInclude(java.lang.String include) |
void |
setShowClazz(java.lang.String showClazz) |
void |
setStyle(java.lang.String style) |
void |
setTitle(java.lang.String title) |
prepareContext
getDynamicActionAttributes, getParameter, getScripts, getStylesheets, prepareContext, setParameter, setScript, setStylesheet
private java.lang.String id
private java.lang.String showClazz
private java.lang.String hideClazz
private java.lang.String style
private java.lang.String contentStyle
private java.lang.String title
private java.lang.String include
public IncludeContentSectionFactory()
public SectionAction[] getActions(InvokationContext<? super SectionAction> context)
ActionFactory
context
- The current invokation contextpublic void setId(java.lang.String id)
public void setShowClazz(java.lang.String showClazz)
public void setHideClazz(java.lang.String hideClazz)
public void setStyle(java.lang.String style)
public void setContentStyle(java.lang.String contentStyle)
public void setTitle(java.lang.String title)
@PathSetter(pathType=CONTEXT_RELATIVE) public void setInclude(java.lang.String include)