|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.codehaus.groovy.grails.web.taglib.GroovySyntaxTag
public abstract class GroovySyntaxTag
A tag type that gets translated directly into Groovy syntax by the GSP parser.
This is used for Java-implemented internal tags that the Parse class uses to directly inject code into the generated GSP source. These tags can do more than custom taglibs as the operate at the code level, rather than at the runtime view rendering level
| Field Summary | |
|---|---|
protected static java.lang.String |
ATTRIBUTE_IN
|
protected static java.lang.String |
ATTRIBUTE_VAR
|
protected java.util.Map<java.lang.String,java.lang.String> |
attributes
|
protected static java.lang.String |
ATTRIBUTES_STATUS
|
protected java.lang.String |
foreachRenamedIt
|
protected java.io.PrintWriter |
out
|
protected GroovyPageParser |
parser
|
protected java.util.Map |
tagContext
|
| Constructor Summary | |
|---|---|
GroovySyntaxTag()
|
|
| Method Summary | |
|---|---|
protected java.lang.String |
calculateExpression(java.lang.String expr)
|
protected void |
doEachMethod(java.lang.String in)
|
protected void |
endEachMethod()
|
java.lang.String |
getForeachRenamedIt()
|
void |
init(java.util.Map context)
|
abstract boolean |
isAllowPrecedingContent()
Tags must return the correct value to indicate whether or not non-whitespace content is permitted before this tag. |
abstract boolean |
isKeepPrecedingWhiteSpace()
Tags must return the correct value to indicate whether or not whitespace before this tag should be kept in the output. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Sets an attribute of the tag |
void |
setAttributes(java.util.Map attributes)
Sets the attributes of the tag |
void |
setWriter(java.io.Writer w)
Sets the writer that processes the tag |
| 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 |
|---|
doEndTag, doStartTag, getName |
| Field Detail |
|---|
protected static final java.lang.String ATTRIBUTE_IN
protected static final java.lang.String ATTRIBUTE_VAR
protected static final java.lang.String ATTRIBUTES_STATUS
protected java.util.Map tagContext
protected java.io.PrintWriter out
protected java.util.Map<java.lang.String,java.lang.String> attributes
protected GroovyPageParser parser
protected java.lang.String foreachRenamedIt
| Constructor Detail |
|---|
public GroovySyntaxTag()
| Method Detail |
|---|
public void init(java.util.Map context)
init in interface GrailsTagpublic void setWriter(java.io.Writer w)
GrailsTag
setWriter in interface GrailsTagpublic void setAttributes(java.util.Map attributes)
GrailsTag
setAttributes in interface GrailsTag
public void setAttribute(java.lang.String name,
java.lang.Object value)
GrailsTag
setAttribute in interface GrailsTagpublic abstract boolean isKeepPrecedingWhiteSpace()
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.
public abstract boolean isAllowPrecedingContent()
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.
TODO rework this and combine with isKeepPrecedingWhiteSpace as really they are used in the same situations
protected java.lang.String calculateExpression(java.lang.String expr)
protected void doEachMethod(java.lang.String in)
in - protected void endEachMethod()
public java.lang.String getForeachRenamedIt()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||