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

The comment on the change is:
Add note about public field introspection

------------------------------------------------------------------------------
    - try rewriting a few pages, using loops instead of repeatedly calling 
velocimacros
  
  Remember, Velocity doesn't compile your templates.  They are parsed into an 
AST (abstract syntax tree) and that is what gets cached.  So, reducing template 
complexity will shrink the tree and produce immediate memory savings.  For 
loops and (java) "tools" are simpler than velocimacros. (Nathan Bubna & Bruno 
Carle)
+ [[BR]]
+  * Q: How can i access my object's public fields in my templates?
+  * A: Currently, you have three options:
+ 
+   - Wrap your object with a 
[http://jakarta.apache.org/velocity/docs/api/org/apache/velocity/app/FieldMethodizer.html
 FieldMethodizer]
+ 
+   - Configure your !VelocityEngine to use a custom uberspector like the 
PublicFieldUberspect
+ 
+   - Lobby the velocity-dev list to add public field introspection as a 
default fallback if no matching method is found :)
  
  === Velocity Tools ===
   * Q: The !MessageTool is throwing a !NullPointerException, why doesn't 
VelocityTools test for NPE's?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to