public class MessagesPresentTag extends ConditionalTagBase
true
if an ActionMessages
class or a
class that can be converted to an ActionMessages
class is in
request scope under the specified key and there is at least one message in
the class or for the property specified.Modifier and Type | Field and Description |
---|---|
protected String |
message
If this is set to 'true', then the
Globals.MESSAGE_KEY
will be used to retrieve the messages from scope. |
Constructor and Description |
---|
MessagesPresentTag() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
condition()
Evaluate the condition that is being tested by this particular tag, and
return
true if the nested body content of this tag should
be evaluated, or false if it should be skipped. |
protected boolean |
condition(boolean desired)
Evaluate the condition that is being tested by this particular tag, and
return
true if there is at least one message in the class
or for the property specified. |
String |
getMessage() |
void |
release()
Release all allocated resources.
|
void |
setMessage(String message) |
doEndTag, doStartTag, getCookie, getHeader, getName, getParameter, getProperty, getRole, getScope, getUser, setCookie, setHeader, setName, setParameter, setProperty, setRole, setScope, setUser
protected String message
Globals.MESSAGE_KEY
will be used to retrieve the messages from scope.public String getMessage()
public void setMessage(String message)
protected boolean condition() throws javax.servlet.jsp.JspException
true
if the nested body content of this tag should
be evaluated, or false
if it should be skipped.condition
in class ConditionalTagBase
javax.servlet.jsp.JspException
- if a JSP exception occursprotected boolean condition(boolean desired) throws javax.servlet.jsp.JspException
true
if there is at least one message in the class
or for the property specified.desired
- Desired outcome for a true resultjavax.servlet.jsp.JspException
- if a JSP exception occurspublic void release()
release
in interface javax.servlet.jsp.tagext.Tag
release
in class ConditionalTagBase
Copyright © 2000–2016 Apache Software Foundation. All rights reserved.