|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.clients.web.extensions.AbstractJspFactory
public abstract class AbstractJspFactory
An abstract BASE class for action and renderer factories. This class provides support for adding scripts and stylesheets to the rendered JSP page.
Use the setScript(String)
and setStylesheet(String)
methods to add references to script and stylesheet files to the factory.
Note! The naming of these methods may be a bit misleading, since each
call ADD the argument to a set. To remove items from the sets use the
getScripts()
and getStylesheets()
methods.
Scripts and stylesheets that has been added to the factory will
be propagated to the JspContext.addScript(String)
and JspContext.addStylesheet(String)
methods in
the prepareContext(JspContext)
.
Field Summary | |
---|---|
private Set<String> |
scripts
|
private Set<String> |
stylesheets
|
Constructor Summary | |
---|---|
AbstractJspFactory()
Create a new factory instance. |
Method Summary | |
---|---|
Set<String> |
getScripts()
Get a set with all script references. |
Set<String> |
getStylesheets()
Get a set with all stylesheet references. |
protected void |
prepareContext(JspContext jspContext)
Prepare the JSP context by adding all registered script and stylesheet references to it. |
void |
setScript(String script)
Add a reference to a javascript file to the factory. |
void |
setStylesheet(String stylesheet)
Add a reference to a CSS stylesheet file to the factory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Set<String> scripts
private Set<String> stylesheets
Constructor Detail |
---|
public AbstractJspFactory()
Method Detail |
---|
protected void prepareContext(JspContext jspContext)
jspContext
- The context to add the scripts to@VariableSetter @PathSetter public void setScript(String script)
script
- The script to add@VariableSetter @PathSetter public void setStylesheet(String stylesheet)
stylesheet
- The stylesheet to addpublic Set<String> getScripts()
public Set<String> getStylesheets()
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |