代码之家  ›  专栏  ›  技术社区  ›  Michel

将x-taglib与c-taglib结合在<x:set>和<c-foreach>

  •  0
  • Michel  · 技术社区  · 16 年前

    can在c-foreach中使用x-taglib变量

    像:

    <x:set var="logrows" select="$doc/properties/entry[@key='foo.bar']"></x:set>
    
    <c:forEach items="${bar.foo}" var="log" begin="0" step="1" varStatus="i" end="${logrows}">
    
    </c:foreach>
    

    谢谢

    1 回复  |  直到 16 年前
        1
  •  1
  •   Michel    16 年前

    没关系,我自己用一种预制构件来解决它:

    <x:set var="tmp" select="$doc/properties/entry[@key='foo.bar']" />
    <x:set var="logrows" select='number($tmp)'/>    
    <c:forEach items="${bar.foo}" var="log" begin="1" step="1" varStatus="i" end="${logrows}">