iBatis for Java [READ ONLY]
  1. iBatis for Java [READ ONLY]
  2. IBATIS-293

Fix use of list[]-notation in propertyattributes of dynamic tags

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2.0
    • Component/s: Core
    • Labels:
      None
    • Environment:
      All are affected.

      Description

      When using an iterate-tag to loop a list, one cannot point to the current element in attributes of inner tags, for example, the following fails:

      <iterate property="myList">
      <isEqual property="myList[].someProperty" compareValue="true">
      $myList[].anotherProperty$
      </isEqual>
      </iterate>

      iBATIS tries to index the property myList with an empty string, but it should use the current element (the []-notation works fine within inner tags), when an index is supplied it works just fine...

        Issue Links

          Activity

          Hide
          Jeff Butler added a comment -

          Fixed in SVN.

          Show
          Jeff Butler added a comment - Fixed in SVN.
          Hide
          Jeff Butler added a comment -

          I've verified that this is an issue. The <isPropertyAvailable>, <isNull>, <isEmpty>, and their <isNot...> counterparts all have the same problem.

          I will implement a fix for this at the same time we fix IBATIS-281.

          Show
          Jeff Butler added a comment - I've verified that this is an issue. The <isPropertyAvailable>, <isNull>, <isEmpty>, and their <isNot...> counterparts all have the same problem. I will implement a fix for this at the same time we fix IBATIS-281 .
          Hide
          Paul McCormick added a comment -

          The <isEqual> and <isNotEqual> tags work correctly with the list property but other tags ( like <isNull> ) do not work.

          The following will fail:
          <iterate property="myList">
          <isNotNull property="myList[].someProperty" >
          $myList[].anotherProperty$
          </isNotNull>
          </iterate>

          Show
          Paul McCormick added a comment - The <isEqual> and <isNotEqual> tags work correctly with the list property but other tags ( like <isNull> ) do not work. The following will fail: <iterate property="myList"> <isNotNull property="myList[].someProperty" > $myList[].anotherProperty$ </isNotNull> </iterate>

            People

            • Assignee:
              Jeff Butler
              Reporter:
              Paul McCormick
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development