org.codehaus.groovy.grails.web.taglib
Class GroovyConditionalTag
java.lang.Object
org.codehaus.groovy.grails.web.taglib.GroovySyntaxTag
org.codehaus.groovy.grails.web.taglib.GroovyConditionalTag
- All Implemented Interfaces:
- GrailsTag
- Direct Known Subclasses:
- GroovyElseIfTag, GroovyIfTag, GroovyUnlessTag
abstract class GroovyConditionalTag
- extends GroovySyntaxTag
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.codehaus.groovy.grails.web.taglib.GrailsTag |
getName |
ATTRIBUTE_TEST
static final String ATTRIBUTE_TEST
- See Also:
- Constant Field Values
ATTRIBUTE_ENV
static final String ATTRIBUTE_ENV
- See Also:
- Constant Field Values
GroovyConditionalTag
GroovyConditionalTag()
doStartTag
public void doStartTag()
- Description copied from interface:
GrailsTag
- Process the start tag
outputStartTag
protected abstract void outputStartTag(String envExpression,
String testExpression)
doEndTag
public void doEndTag()
- Description copied from interface:
GrailsTag
- process the end tag
attributeValueOrNull
protected String attributeValueOrNull(String attributeName)
isKeepPrecedingWhiteSpace
public boolean isKeepPrecedingWhiteSpace()
- Description copied from class:
GroovySyntaxTag
Tags must return the correct value to indicate whether or not whitespace before this tag should be kept in the output.
This is for tags that must follow other tags, such as g:else or g:elseif that do not allow content between them and the
previous tag, and need to swallow the whitespace between them.
- Specified by:
isKeepPrecedingWhiteSpace
in class GroovySyntaxTag
- Returns:
- True if any whitespace immediately before the tag should be kept in the output - false if it is to be discarded
isAllowPrecedingContent
public boolean isAllowPrecedingContent()
- Description copied from class:
GroovySyntaxTag
Tags must return the correct value to indicate whether or not non-whitespace content is permitted before this tag.
This is for tags that must follow other tags, such as g:else or g:elseif that do not allow content between them and the
previous tag. It is simply used as a safety mechanism to trap incorrect usage of tags.
- Specified by:
isAllowPrecedingContent
in class GroovySyntaxTag
- Returns:
- True if any content is allowed immediately before the tag - false if it is an error to have such content before it