ICEfaces
  1. ICEfaces
  2. ICE-6121

Icefaces2 Auction has problems

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Beta2
    • Fix Version/s: 2.0-Beta2
    • Component/s: Sample Apps
    • Labels:
      None
    • Environment:
      Icefaces2 revision# 22596
      Server: Tomcat6
      JDk 1.6.0_18
    • Affects:
      Sample App./Tutorial

      Description

      Problem seen when user tries to bid on an item other than the item on the top:
      1) click on bid button for Ice Breaker
      2) inputtext box for Ice Breaker is displayed beside Ice Sailor
      3) Also the amount in the text box is incorrect, it is displaying Ice Car's price.
      See screenshot1

      Duplicate Item Names displayed after sorting. One item name is displayed twice. see screenshot2

        Activity

        Hide
        Deryk Sinotte added a comment -

        We are currently using a ui:repeat where the each row in the table is the repeating structure. The table is constructed of straight HTML rather than using a component so simply adding a static id to the table elements will only result in that static id repeating as well. For example, if we do this:

        <td id="td2" ...

        then every row in the table will have a matching id. This means that as we interact with the table and the updates come back, they will be applied to the first id it finds. In this case, it will always be the table elements in the first row. This explains why whichever button is clicked on, it updates the status or value of the first one only.

        My fix was to add a dynamic portion to the id using the status.index value of ui:repeat. This basically reflects the current row number and is differrent for each row:

        <td id="row_#

        {status.index}

        _td2"

        Show
        Deryk Sinotte added a comment - We are currently using a ui:repeat where the each row in the table is the repeating structure. The table is constructed of straight HTML rather than using a component so simply adding a static id to the table elements will only result in that static id repeating as well. For example, if we do this: <td id="td2" ... then every row in the table will have a matching id. This means that as we interact with the table and the updates come back, they will be applied to the first id it finds. In this case, it will always be the table elements in the first row. This explains why whichever button is clicked on, it updates the status or value of the first one only. My fix was to add a dynamic portion to the id using the status.index value of ui:repeat. This basically reflects the current row number and is differrent for each row: <td id="row_# {status.index} _td2"
        Hide
        Ken Fyten added a comment -

        Fixed.

        Show
        Ken Fyten added a comment - Fixed.
        Hide
        Mandeep Hayher added a comment -

        Verified successfully on Icefaces2 trunk revision# 22650.

        Show
        Mandeep Hayher added a comment - Verified successfully on Icefaces2 trunk revision# 22650.

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Mandeep Hayher
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: