You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by st...@gmail.com on 2006/02/08 17:25:13 UTC

about the iterate usage

Dear all,

I know "iterate" is of java.util.List, so I  have to initial the length for
the array in Java. Generally it use brackets[].
  <iterate property="fruits" conjunction=",">
    (#fruits[].id#, #fruits[].name#)
  </iterate>

Now I need insert some data, and the length is not fixed. So can I use the
arraylist to replace list? Writing like this:
  <iterate property="fruits" conjunction=",">
    (#fruits.getid()#, #fruits.getname()#)
  </iterate>

Thanks so much for your warm-hearted help.

Steven