ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Butler" <jeffgbut...@gmail.com>
Subject Re: Iterator and List of List
Date Fri, 25 Apr 2008 15:01:43 GMT
I got this to work in a simple test:

<iterator property="outerlist" ..>
 ....
 <iterator property="outerlist[]" ...>
    #outerlist[].[]#
 </iterator>
</iterator>
But "outerlist" must be a valid property in your parameter class - I had to
put outerlist into a HashMap.

Jeff Butler

On Fri, Apr 25, 2008 at 5:23 AM, gumnaam23 <vkbhaskar@yahoo.com> wrote:

>
> I am trying use nested iterators to iterate over a List of List using the
> following code
>
> <iterator property="outerlist" ..>
>  ....
>  <iterator property="outerlist[]" ...>
>     #outerlist[][]#
>  </iterator>
> </iterator>
>
> But I get a ProbeException. I suspect it's the innter iterator tag, that's
> having a problem.
> Any clues on how to solve this ?
>
> Below is the error message.
>
> com.ibatis.common.beans.ProbeException: Error getting ordinal list from
> JavaBean. Cause java.lang.NumberFormatException: For input string: ""
>        at
> com.ibatis.common.beans.BaseProbe.getIndexedProperty(BaseProbe.java:86)
>        at
>
> com.ibatis.common.beans.ComplexBeanProbe.getProperty(ComplexBeanProbe.java:298)
>        at
>
> com.ibatis.common.beans.ComplexBeanProbe.getObject(ComplexBeanProbe.java:190)
>        at
> com.ibatis.common.beans.GenericProbe.getObject(GenericProbe.java:74)
>        at
>
> com.ibatis.sqlmap.engine.mapping.sql.dynamic.elements.IterateTagHandler.doStartFragment(IterateTagHandler.java:47)
>        at
>
> com.ibatis.sqlmap.engine.mapping.sql.dynamic.DynamicSql.processBodyChildren(DynamicSql.java:156)
>        at
>
> com.ibatis.sqlmap.engine.mapping.sql.dynamic.DynamicSql.processBodyChildren(DynamicSql.java:159)
>        at
>
> com.ibatis.sqlmap.engine.mapping.sql.dynamic.DynamicSql.processBodyChildren(DynamicSql.java:159)
>        at
>
> com.ibatis.sqlmap.engine.mapping.sql.dynamic.DynamicSql.processBodyChildren(DynamicSql.java:159)
>        at
>
> com.ibatis.sqlmap.engine.mapping.sql.dynamic.DynamicSql.processBodyChildren(DynamicSql.java:159)
>        at
>
> com.ibatis.sqlmap.engine.mapping.sql.dynamic.DynamicSql.processBodyChildren(DynamicSql.java:159)
>        at
>
> com.ibatis.sqlmap.engine.mapping.sql.dynamic.DynamicSql.processBodyChildren(DynamicSql.java:98)
>        at
>
> com.ibatis.sqlmap.engine.mapping.sql.dynamic.DynamicSql.process(DynamicSql.java:78)
>        at
>
> com.ibatis.sqlmap.engine.mapping.sql.dynamic.DynamicSql.getParameterMap(DynamicSql.java:60)
>        at
>
> com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.getCacheKey(MappedStatement.java:328)
>        at
>
> com.ibatis.sqlmap.engine.mapping.statement.CachingStatement.getCacheKey(CachingStatement.java:111)
>        at
>
> com.ibatis.sqlmap.engine.mapping.statement.CachingStatement.executeQueryForList(CachingStatement.java:87)
>        at
>
> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:567)
>        at
>
> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:541)
>        at
>
> com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)
>        at
>
> org.springframework.orm.ibatis.SqlMapClientTemplate$3.doInSqlMapClient(SqlMapClientTemplate.java:298)
>        at
>
> org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:209)
>        at
>
> org.springframework.orm.ibatis.SqlMapClientTemplate.executeWithListResult(SqlMapClientTemplate.java:249)
>        at
>
> org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList(SqlMapClientTemplate.java:296)
>        at
> --
> View this message in context:
> http://www.nabble.com/Iterator-and-List-of-List-tp16894496p16894496.html
> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>
>

Mime
View raw message