You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Apache Wiki <wi...@apache.org> on 2005/07/22 19:42:37 UTC

[Jakarta-velocity Wiki] Update of "VelocityFAQ" by TimColson

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 TimColson:
http://wiki.apache.org/jakarta-velocity/VelocityFAQ

------------------------------------------------------------------------------
   * Q: Fred Toth's solution doesn't work for VelocityTools 1.2.  :(
   * A: From 1.2, !VelocityViewServlet uses the !SeparateInstanceModel.  You will have to set the !VelocityEngine instead of the Velocity singleton class.  Something like SilentParseInclude.
  [[BR]]
+  * Q: Why are Velocity templates not working from JavaScript?
+  * A: Velocity runs on the *server*, whereas JavaScript runs on the *client* in the browser. Think of it this way: user requests a page ---> server uses velocity to render templates into HTML (with JavaScript ---> browser displays the page that consists of HTML & JavaScript. 
+ In other words, all of the Velocity template processing happens *before* the page is sent to the browser. There is no way for JavaScript to render Velocity template directives without going BACK to the server. Note also that Velocity *can* be used to render custom JavaScript. (Tim Colson) 
+ 
  
  === Velocity Tools ===
   * Q: The !MessageTool is throwing a !NullPointerException, why doesn't VelocityTools test for NPE's?

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org