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 Greg Preston <gr...@gmail.com> on 2005/09/24 17:59:53 UTC

Iteration Problem

All,
 There have been several good posts on this board regarding the use of the
iteration tag over a list. For some reason I get the following error:
 There is no READABLE property named 'approvalRoles[]' in class '
com.intv.it.rw.model.SessionCache'

<select id="list-open-approvals"
parameterClass="com.intv.it.rw.model.SessionCache"
resultClass="com.intv.it.rw.model.RequestLineApprovals">
<![CDATA[
SELECT
...
AND rla.finalized <> 'X'

<dynamic prepend="AND">
<iterate property="approvalRoles"
open=" rla.approval_role_id IN ("
close=")" conjunction=",">
#approvalRoles[]#
</iterate>
</dynamic>
]]>

I've tried passing an unwrapped list by specifing java.util.List as the
parameter and by using various permeintations of #[]# and #value[]#. All
with no joy. I'm using version 2.1.5.

Thanks in advance,

Greg

AW: Iteration Problem

Posted by "Volker_Reichel@t-online.de" <vo...@t-online.de>.
Greg,

it seems you ran into to same problem we discussed yesterday. Subject was:
"ProbeException: Error getting ordinal list from JavaBean".
The solution is to remove the CDATA section and replace all '<','>'
characters with &lt; , &gt. This will solve your problem.



  -----Ursprüngliche Nachricht-----
  Von: Greg Preston [mailto:greg.preston@gmail.com]
  Gesendet: Samstag, 24. September 2005 18:00
  An: user-java@ibatis.apache.org
  Betreff: Iteration Problem


  All,

  There have been several good posts on this board regarding the use of the
iteration tag over a list.  For some reason I get the following error:

  There is no READABLE property named 'approvalRoles[]' in class
'com.intv.it.rw.model.SessionCache'

          <select id="list-open-approvals"
                   parameterClass="com.intv.it.rw.model.SessionCache"
                   resultClass="com.intv.it.rw.model.RequestLineApprovals">
            <![CDATA[
                  SELECT
                          ...
                          AND rla.finalized <> 'X'

                            <dynamic prepend="AND">
                                <iterate property="approvalRoles"
                                 open=" rla.approval_role_id IN ("
                                 close=")" conjunction=",">
                                  #approvalRoles[]#
                                </iterate>
                            </dynamic>
               ]]>

  I've tried passing an unwrapped list by specifing java.util.List as the
parameter and by using various permeintations of #[]# and #value[]#.  All
with no joy.  I'm using version 2.1.5.

  Thanks in advance,

  Greg