You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by "White, Tim" <Ti...@qwest.com> on 2004/01/27 15:00:41 UTC

Loading templates from DB/Web Service Call?

Has anyone tried loading templates from a database or from the results of a web service call?

We're storing our .vm files in a content management system, and we're looking at pulling them out via a web service call, rather than off the filesystem...

Thanks,

Tim White

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


Re: Loading templates from DB/Web Service Call?

Posted by Geir Magnusson Jr <ge...@4quarters.com>.
On Jan 27, 2004, at 9:00 AM, White, Tim wrote:

> Has anyone tried loading templates from a database or from the results 
> of a web service call?
>
> We're storing our .vm files in a content management system, and we're 
> looking at pulling them out via a web service call, rather than off 
> the filesystem...

That would be a cool little loader :)  Darn slow, though.  My simple 
tests in the past have shown that a simple servlet is about 4x as fast 
as using Axis, for example.

geir

-- 
Geir Magnusson Jr                                   203-247-1713(m)
geir@4quarters.com


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


Macro calling itself question

Posted by "Charles N. Harvey III" <ch...@alloy.com>.
Hello.
I have a recursive macro and I swear it was working a week ago
but now I get an error in my logs telling me I am sending too
few arguments.  What gives?


##
## Category Branch macro
#macro( categoryBranch $categoryTree $padding )
  #foreach( $category in $categoryTree )
    #if($category.usage != "MAIN")
      <p style="padding-left:${padding}px;">
      <a 
href="$link.setRelative("$category.url?catalogId=$category.stringId")">$category.name</a>
      </p>
    #end
    #categoryBranch( $category.subCategories $math.add($padding,0) )
  #end
#end

This is the error I get:

(SimpleLog4JLogSystem.java:181) - VM #categoryBranch: error : too few 
arguments to macro. Wanted 2 got 0


Why is it saying that?  I AM passing 2 arguments.  Is it because they 
are null?
I tried to wrap it in an #if($category) and it still threw the error.

Any tips on how to fix this one are greatly appreciated.


Charlie



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