-
Notifications
You must be signed in to change notification settings - Fork 371
VelocityTemplate
Angelo edited this page Aug 4, 2015
·
2 revisions
See http://velocity.apache.org/
Create class NullValueInsertionEventHandler which implements ReferenceInsertionEventHandler from Velocity that implements the bahaviour of Velocity:
public class NullValueInsertionEventHandler implements ReferenceInsertionEventHandler {
@Override
public Object referenceInsert(String string, Object object) {
if (object == null) {
return "";
}
return object;
}
}
Use NullValueInsertionEventHandler like this :
IContext context = report.createContext();
EventCartridge eventCartridge = new EventCartridge();
eventCartridge.addEventHandler(new NullValueInsertionEventHandler());
eventCartridge.attachToContext((VelocityContext) context);
- Overview
- Getting Started
- FAQ
- Which License Applies
- Download
- Developer's Guide
- User's Guide
- Contributor's Guide
- Acknowledgment
- Articles
- Releases