@groovy.transform.Trait @groovy.transform.CompileStatic trait TagLibrary extends java.lang.Object implements ServletAttributes, TagLibraryInvoker, WebAttributes
A trait that makes a class into a GSP tag library
| Type | Name and description |
|---|---|
GrailsPrintWriter |
out |
| Type Params | Return Type | Name and description |
|---|---|---|
|
GrailsPrintWriter |
getOut()Obtains the currently output writer |
|
TemplateVariableBinding |
getPageScope()Obtains the page scope instance |
|
java.lang.String |
getTaglibNamespace() |
|
void |
initializeTagLibrary()Retained deliberately, and deliberately empty. |
|
java.lang.Object |
propertyMissing(java.lang.String name)Property missing implementation that looks up tag library namespaces or tags in the default namespace |
|
java.lang.Object |
raw(java.lang.Object value) |
|
void |
setOut(java.io.Writer newOut)Sets the current output writer |
|
void |
throwTagError(java.lang.String message)Throws a GrailsTagException |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
Obtains the currently output writer
Obtains the page scope instance
Retained deliberately, and deliberately empty.
Every tag in every namespace used to be installed onto this tag library's metaclass here, so that a tag library calling another tag found a method rather than falling through to methodMissing. Tags are resolved through the tag library lookup instead, so there is nothing to install and nothing to initialise.
It cannot simply be deleted. A trait method is part of the binary contract: Groovy weaves a call to the generated helper into every implementing class, so a tag library from a plugin compiled against an earlier release calls this method by name at construction. Removing it raises NoSuchMethodError for every such tag library - which is what happened when it was.
Property missing implementation that looks up tag library namespaces or tags in the default namespace
name - The property nameSets the current output writer
newOut - The new output writerThrows a GrailsTagException
message - The error message