【问题标题】:recursive method with nvelocity具有速度的递归方法
【发布时间】:2011-10-24 14:32:25
【问题描述】:

我正在使用单轨列车,我已经:

在我的模型中:

class Foo
{
   public List<Foo> foos;
}

在我的控制器中:

PropertyBag["foos"] = foos; // foos is initialised

在我看来:

<ul>
    #foreach($foo in $foos)
         <li>
            // recursive method I want to render alls the foos
         <li>  
    #end
</ul>

我该怎么做?

【问题讨论】:

    标签: castle-monorail nvelocity


    【解决方案1】:

    您可以尝试编写递归宏(参见caveatsreferenceexample),但我可能只写一个helper

    【讨论】:

    • 好的,我用宏试过了,但我不能让它工作,我会用 Helper,谢谢
    猜你喜欢
    • 2013-07-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-11-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多