[ http://issues.apache.org/jira/browse/VELOCITY-189?page=all ] Will Glass-Husain resolved VELOCITY-189: ----------------------------------------
Resolution: Fixed Assign To: (was: Velocity-Dev List) Solution provided by Shinobu - no comment from original poster - closing issue. Re-open it or post to the velocity-user list please with any other questions or comments. > Provide access to the underlying RuntimeInstance instance of > Velocity/VelocityEngine class > ------------------------------------------------------------------------------------------ > > Key: VELOCITY-189 > URL: http://issues.apache.org/jira/browse/VELOCITY-189 > Project: Velocity > Type: Improvement > Components: Source > Versions: 1.3.1 > Environment: Operating System: All > Platform: All > Reporter: Dan Kokotov > Priority: Minor > > It would be nice to be able to access the underlying VelocityEngine instance > to > which the Velocity facade class delegates. That way i can have logic that > either > uses a default application-wide velocity config or a specific one, i.e. > public class AppConfig { > public void init (...) { > // init app-wide velocity > Velocity.init (..); > } > } > public class Foo { > private VelocityEngine m_engine; > public void init (String velConfigFile, ...) { > .. > if (velConfigFile != null) { > m_engine = new VelocityEngine (); > m_engine.init (velConfigFile); > } else { > m_engine = Velocity.getEngine (); > } > } > // other methods use m_engine > } > As it is now, to do something like this you'd have to have everywhere you use > velocity the logic of > if (haveOwnConfig) { > my_engine.merge (..); > } else { > Velocity.merge (..); > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]