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 String |
contentStyle |
private String |
hideClazz |
private String |
id |
private String |
include |
private String |
showClazz |
private String |
style |
private 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(String contentStyle) |
void |
setHideClazz(String hideClazz) |
void |
setId(String id) |
void |
setInclude(String include) |
void |
setShowClazz(String showClazz) |
void |
setStyle(String style) |
void |
setTitle(String title) |
prepareContext
getDynamicActionAttributes, getParameter, getScripts, getStylesheets, prepareContext, setParameter, setScript, setStylesheet
private String id
private String showClazz
private String hideClazz
private String style
private String contentStyle
private String title
private String include
public IncludeContentSectionFactory()
public SectionAction[] getActions(InvokationContext<? super SectionAction> context)
ActionFactory
context
- The current invokation contextpublic void setId(String id)
public void setShowClazz(String showClazz)
public void setHideClazz(String hideClazz)
public void setStyle(String style)
public void setContentStyle(String contentStyle)
public void setTitle(String title)
@PathSetter(pathType=CONTEXT_RELATIVE) public void setInclude(String include)