|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectorg.apache.tiles.jsp.context.JspUtil
public final class JspUtil
Utility class for working within a Jsp environment.
| Field Summary | |
|---|---|
static String |
COMPOSE_STACK_ATTRIBUTE_NAME
The name of the attribute that will contain the compose stack. |
| Method Summary | |
|---|---|
static void |
evaluateFragment(JspFragment fragment)
Evaluates the fragment (invokes it with a null Writer) if not null. |
static String |
evaluateFragmentAsString(JspFragment fragment)
Evaluates the fragment and returns its content as a string. |
static ArrayStack<Object> |
getComposeStack(JspContext context)
Returns the compose stack, that is used by the tags to compose definitions, attributes, etc. |
static TilesContainer |
getContainer(JspContext context)
Returns the default Tiles container. |
static TilesContainer |
getContainer(JspContext context,
String key)
Returns a specific Tiles container. |
static TilesContainer |
getCurrentContainer(JspContext context)
Returns the current container that has been set, or the default one. |
static int |
getScope(String scopeName)
Converts the scope name into its corresponding PageContext constant value. |
static boolean |
isForceInclude(JspContext context)
Returns true if forced include of the result is needed. |
static void |
setContainer(JspContext context,
TilesContainer container)
Configures the default container to be used in the application. |
static void |
setContainer(JspContext context,
TilesContainer container,
String key)
Configures the container to be used in the application. |
static void |
setCurrentContainer(JspContext context,
String key)
Sets the current container to use in web pages. |
static void |
setCurrentContainer(JspContext context,
TilesContainer container)
Sets the current container to use in web pages. |
static void |
setForceInclude(JspContext context,
boolean forceInclude)
Sets the option that enables the forced include of the response. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String COMPOSE_STACK_ATTRIBUTE_NAME
| Method Detail |
|---|
public static boolean isForceInclude(JspContext context)
context - The page context.
true the include operation must be forced.
public static void setForceInclude(JspContext context,
boolean forceInclude)
context - The page context.forceInclude - If true the include operation must be
forced.public static TilesContainer getContainer(JspContext context)
context - The page context to use.
public static TilesContainer getContainer(JspContext context,
String key)
context - The page context to use.key - The key under which the container is stored. If null, the
default container will be returned.
public static void setContainer(JspContext context,
TilesContainer container)
context - The page context object to use.container - The container object to set.
public static void setContainer(JspContext context,
TilesContainer container,
String key)
context - The page context object to use.container - The container object to set.key - The key under which the container will be stored.
public static void setCurrentContainer(JspContext context,
String key)
context - The page context to use.key - The key under which the container is stored.
public static void setCurrentContainer(JspContext context,
TilesContainer container)
context - The page context to use.container - The container to use as the current container.public static TilesContainer getCurrentContainer(JspContext context)
context - The page context to use.
public static ArrayStack<Object> getComposeStack(JspContext context)
context - The page context.
public static int getScope(String scopeName)
throws TilesJspException
scopeName - Can be "page", "request", "session", or "application" in any
case.
TilesJspException - if the scopeName is not a valid name.
public static void evaluateFragment(JspFragment fragment)
throws JspException,
IOException
fragment - The fragment to evaluate.
JspException - If the fragment invocation fails.
IOException - If the fragment invocation fails.
public static String evaluateFragmentAsString(JspFragment fragment)
throws JspException,
IOException
fragment - The fragment to evaluate.
JspException - If the fragment invocation fails.
IOException - If the fragment invocation fails with an I/O error.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||