Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.3.5, 5.3.6
    • Fix Version/s: 5.3.7, 5.4
    • Component/s: tapestry-core
    • Labels:

      Description

      IdGenerator of javascriptSupport PartialMarkupRendererFilter is using Long.toHexString(System.currentTimeMillis()) as a suffix for ids.If two ajax requests arrive at the same time they will both have the same suffix.If both request will render a component named Sort (From grid) then many sort links will have same ids.Found it out because i had 10 progressive displays in my page each drawing an inPlace grid.Some of the sort links will also sort another grid when clicked since they have the same id.

        Activity

        Hide
        Kalle Korhonen added a comment -

        Changed to use nanoTime() instead of millis. This doesn't prevent id conflicts from happening, but should greatly reduce the chances.

        Show
        Kalle Korhonen added a comment - Changed to use nanoTime() instead of millis. This doesn't prevent id conflicts from happening, but should greatly reduce the chances.
        Hide
        Hudson added a comment -

        Integrated in tapestry-trunk-freestyle #1046 (See https://builds.apache.org/job/tapestry-trunk-freestyle/1046/)
        FIXED - TAP5-2025: Duplicate generated ids (Revision 6fd011e7d598a087766e27bc89bdc239dc60dc6d)

        Result = FAILURE
        kaosko :
        Files :

        • tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/JavaScriptModule.java
        • tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ajax/AjaxFormUpdateControllerImpl.java
        Show
        Hudson added a comment - Integrated in tapestry-trunk-freestyle #1046 (See https://builds.apache.org/job/tapestry-trunk-freestyle/1046/ ) FIXED - TAP5-2025 : Duplicate generated ids (Revision 6fd011e7d598a087766e27bc89bdc239dc60dc6d) Result = FAILURE kaosko : Files : tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/JavaScriptModule.java tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ajax/AjaxFormUpdateControllerImpl.java
        Hide
        Dimitris Zenios added a comment -

        Why dont you use an atomic variable that will increment and set as uid along with currentTimeInMillis. This way there is no possibility of having conflicts.

        Show
        Dimitris Zenios added a comment - Why dont you use an atomic variable that will increment and set as uid along with currentTimeInMillis. This way there is no possibility of having conflicts.

          People

          • Assignee:
            Kalle Korhonen
            Reporter:
            Dimitris Zenios
          • Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development