Package play.template2
Class GTJavaBase
java.lang.Object
play.template2.GTRenderingResult
play.template2.GTJavaBase
- Direct Known Subclasses:
GTJavaBase1xImpl
-
Field Summary
FieldsModifier and TypeFieldDescriptiongroovy.lang.Binding
protected GTJavaBase
protected GTJavaBase
protected GTTemplateLocationReal
protected groovy.lang.Script
static final ThreadLocal<Map<Object,
Object>> final GTTemplateLocation
Fields inherited from class play.template2.GTRenderingResult
allOuts
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
GTJavaBase
(Class<? extends GTGroovyBase> groovyClass, GTTemplateLocation templateLocation) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
abstract Object
abstract void
void
abstract String
convertRawDataToString
(Object rawData) See getRawDataClass for infoboolean
protected void
abstract String
abstract String
escapeHTML
(String s) abstract String
boolean
evaluateCondition
(Object test) abstract Class
return the class/interface that, when an object is instanceof it, we should use convertRawDataToString when converting it to String.protected String
handleMessageTag
(Object _args) protected void
protected void
insertNewOut
(StringWriter outToInsert) void
insertOutput
(GTRenderingResult otherTemplate) void
internalRenderTemplate
(Map<String, Object> args, boolean startingNewRendering, GTJavaBase callingTemplate) void
internalRenderTemplate
(Map<String, Object> orgArgs, Map<String, Object> tagArgs, boolean startingNewRendering, GTJavaBase callingTemplate) protected void
invokeTagFile
(String tagName, String tagFilePath, GTContentRenderer contentRenderer, Map<String, Object> tagArgs) protected void
void
renderTemplate
(Map<String, Object> args) protected abstract String
resolveMessage
(Object key, Object[] args) If name starts with './', then we look for the template/name in the same folder as this template.void
abstract boolean
validationHasError
(String key) abstract boolean
void
writeOutput
(OutputStream ps, Charset encoding) Methods inherited from class play.template2.GTRenderingResult
getAsString
-
Field Details
-
out
-
groovyScript
protected groovy.lang.Script groovyScript -
binding
public groovy.lang.Binding binding -
extendsTemplateLocation
-
extendedTemplate
-
extendingTemplate
-
contentRenderer
-
templateRepo
-
templateLocation
-
layoutData
-
-
Constructor Details
-
GTJavaBase
protected GTJavaBase(Class<? extends GTGroovyBase> groovyClass, GTTemplateLocation templateLocation)
-
-
Method Details
-
writeOutput
- Overrides:
writeOutput
in classGTRenderingResult
-
insertOutput
-
insertNewOut
-
initNewOut
protected void initNewOut() -
renderTemplate
public void renderTemplate(Map<String, Object> args) throws GTTemplateNotFoundWithSourceInfo, GTRuntimeException -
internalRenderTemplate
public void internalRenderTemplate(Map<String, Object> args, boolean startingNewRendering, GTJavaBase callingTemplate) throws GTTemplateNotFoundWithSourceInfo, GTRuntimeException -
internalRenderTemplate
public void internalRenderTemplate(Map<String, Object> orgArgs, Map<String, throws GTTemplateNotFoundWithSourceInfo, GTRuntimeExceptionObject> tagArgs, boolean startingNewRendering, GTJavaBase callingTemplate) -
_renderTemplate
protected abstract void _renderTemplate() -
enterTag
-
leaveTag
-
getRawDataClass
return the class/interface that, when an object is instanceof it, we should use convertRawDataToString when converting it to String. Framework should override. -
convertRawDataToString
See getRawDataClass for info -
escapeHTML
-
escapeXML
-
escapeCsv
-
objectToString
-
evaluateCondition
-
invokeTagFile
-
validationHasErrors
public abstract boolean validationHasErrors() -
validationHasError
-
resolveMessage
-
clearElseFlag
public void clearElseFlag() -
setElseFlag
public void setElseFlag() -
elseFlagIsSet
public boolean elseFlagIsSet() -
handleMessageTag
-
convertToIterator
-
resolveTemplateLocation
If name starts with './', then we look for the template/name in the same folder as this template. If not, we look for name/path in all template-places.- Parameters:
name
-- Returns:
-
cacheGet
-
cacheSet
-