|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.turbine.modules.Assembler org.apache.turbine.modules.Screen org.apache.turbine.modules.screens.TemplateScreen
Template Screen. Base Template Screens should extend this class and override the buildTemplate() method. Users of the particular service can then override the doBuildTemplate() for any specific pre-processing. You can also override the doBuild() method in order to add extra functionality to your system, but you need to make sure to at least duplicate the existing functionality in order for things to work. Look at the code for the doBuild() method to get an idea of what is going on there (it is quite simple really).
Field Summary | |
protected org.apache.commons.logging.Log |
log
Logging |
Constructor Summary | |
TemplateScreen()
|
Method Summary | |
abstract org.apache.ecs.ConcreteElement |
buildTemplate(RunData data)
This method should be implemented by Base template classes. |
protected org.apache.ecs.ConcreteElement |
doBuild(RunData data)
This method is called by the Screenloader to construct the Screen. |
protected abstract void |
doBuildTemplate(RunData data)
This method should be overidden by subclasses that wish to add specific business logic. |
protected void |
doPostBuildTemplate(RunData data)
This method can be overridden to write code that executes when the template has been built (called from a finally clause, so executes regardless of whether an exception is thrown or not) |
void |
doRedirect(RunData data,
java.lang.String template)
You can call this within a Screen to cause an internal redirect to happen. |
void |
doRedirect(RunData data,
java.lang.String screen,
java.lang.String template)
You can call this within a Screen to cause an internal redirect to happen. |
static void |
setTemplate(RunData data,
java.lang.String template)
This method is used when you want to short circuit a Screen and change the template that will be executed next. |
Methods inherited from class org.apache.turbine.modules.Screen |
build, getLayout, prepareText, prepareTextMinimum, setLayout |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected org.apache.commons.logging.Log log
Constructor Detail |
public TemplateScreen()
Method Detail |
protected abstract void doBuildTemplate(RunData data) throws java.lang.Exception
data
- Turbine information.
java.lang.Exception
- A generic exception.public abstract org.apache.ecs.ConcreteElement buildTemplate(RunData data) throws java.lang.Exception
data
- Turbine information.
java.lang.Exception
- A generic exception.protected void doPostBuildTemplate(RunData data)
protected org.apache.ecs.ConcreteElement doBuild(RunData data) throws java.lang.Exception
doBuild
in class Screen
data
- Turbine information.
java.lang.Exception
- A generic exception.public static void setTemplate(RunData data, java.lang.String template)
data
- Turbine information.template
- The name of the next template.public void doRedirect(RunData data, java.lang.String screen, java.lang.String template) throws java.lang.Exception
This class is useful if you have a Screen that submits to another Screen and you want it to do error validation before executing the other Screen. If there is an error, you can doRedirect() back to the original Screen.
data
- Turbine information.screen
- Name of screen to redirect to.template
- Name of template.
java.lang.Exception
- A generic exception.public void doRedirect(RunData data, java.lang.String template) throws java.lang.Exception
This class is useful if you have a Screen that submits to another Screen and you want it to do error validation before executing the other Screen. If there is an error, you can doRedirect() back to the original Screen.
data
- Turbine information.template
- Name of template.
java.lang.Exception
- A generic exception.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |