Package org.apache.velocity.app.event
Interface ReferenceInsertionEventHandler
- All Superinterfaces:
EventHandler
- All Known Implementing Classes:
EscapeHtmlReference
,EscapeJavaScriptReference
,EscapeReference
,EscapeSqlReference
,EscapeXmlReference
Reference 'Stream insertion' event handler. Called with object
that will be inserted into stream via value.toString().
Please return an Object that will toString() nicely :)
- Version:
- $Id: ReferenceInsertionEventHandler.java 685685 2008-08-13 21:43:27Z nbubna $
- Author:
- Will Glass-Husain, Geir Magnusson Jr.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
Defines the execution strategy for referenceInsert -
Method Summary
Modifier and TypeMethodDescriptionreferenceInsert
(String reference, Object value) A call-back which is executed during Velocity merge before a reference value is inserted into the output stream.
-
Method Details
-
referenceInsert
A call-back which is executed during Velocity merge before a reference value is inserted into the output stream. All registered ReferenceInsertionEventHandlers are called in sequence. If no ReferenceInsertionEventHandlers are are registered then reference value is inserted into the output stream as is.- Parameters:
reference
- Reference from template about to be inserted.value
- Value about to be inserted (after itstoString()
method is called).- Returns:
- Object on which
toString()
should be called for output.
-