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/09/14 00:34:09 UTC
[Jakarta-velocity Wiki] Update of "VelocityFAQ" by NathanBubna
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:
please ask the user list before editing the FAQ. still, here's your answer.
------------------------------------------------------------------------------
The archives are littered with snippets of wisdom that are not captured in the User or Developer guides. Find something that isn't in the manual, and folks ask a lot on the list? Please, add it here. Eventually, the info may move into the offical guides.
=== Velocity ===
* Q: How can conditionals be nested? For example, in the equivalent of "if($a){ if($b){ b1; } else{ b2; } if($c){ c1; } else { c2; } }", where do the '#end's go?
- * A:
+ * A: Exactly where you put the closing parentheses in java. So your example would be "#if( $a )#if( $b ) b1 #else b2 #end #if( $c ) c1 #else c2 #end#end". Pretty easy.
[[BR]]
* Q: Adding ## at the end of a template causes a parsing exception, what do I do?
* A: For now, a workaround is: add a newline to the end of the file.
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org