Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-202

Foreach component fails to query the last item

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Resolution: Won't Fix
    • 3.0
    • None
    • Framework
    • None
    • Operating System: All
      Platform: All
    • 30484

    Description

      When using SqlTableModel to display a database table
      org.apache.tapestry.components.Foreach component closes the resultset before
      reading the last row information:

      <clip>
      while (hasNext)
      {
      _value = dataSource.next();
      hasNext = dataSource.hasNext(); // ResultSet closed here!!!!

      if (indexBinding != null)
      indexBinding.setInt(_index);

      if (valueBinding != null)
      valueBinding.setObject(_value);

      if (element != null)

      { writer.begin(element); renderInformalParameters(writer, cycle); }

      renderBody(writer, cycle);

      if (element != null)
      writer.end();

      _index++;

      }

      <clip>

      Attachments

        Activity

          People

            Unassigned Unassigned
            mikko.holmberg@codebakers.fi Mikko Holmberg
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: