Dear Wiki user, You have subscribed to a wiki page or wiki category on "Jakarta-velocity Wiki" for change notification.
The following page has been changed by ShinobuKawaiYoshida: http://wiki.apache.org/jakarta-velocity/SilentParseInclude The comment on the change is: add SilentParseInclude New page: {{{ package org.apache.velocity.tools.generic; import org.apache.velocity.app.Velocity; import org.apache.velocity.app.VelocityEngine; import org.apache.velocity.tools.view.context.ViewContext; import org.apache.velocity.tools.view.tools.ViewTool; public class TemplateExistsTool implements ViewTool { private VelocityEngine engine = null; public VelocityEngine getVelocityEngine() { return this.engine; } public void setVelocityEngine(VelocityEngine engine) { this.engine = engine; } public void init(Object obj) { // if ViewContext, try to retrieve a VelocityEngine for use if (obj instanceof ViewContext) { this.setVelocityEngine(((ViewContext) obj).getVelocityEngine()); } } public boolean exists(String template) { if (this.engine == null) { return Velocity.resourceExists(template); } return this.engine.resourceExists(template); } } }}} --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
