Wicket
  1. Wicket
  2. WICKET-4758

DOM ids change of the input fields of FilterToolbar

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.8, 6.0.0
    • Fix Version/s: 6.1.0
    • Component/s: wicket-extensions
    • Labels:
      None

      Description

      The fix in WICKET-3916 is not effective: https://fisheye6.atlassian.com/changelog/wicket?cs=1148229

      https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/Component.java#L2506

      As one can see in Component.internalRenderComponent(), the method Component.onComponentTag(), where the markup id is written to the tag, is called before the behavior had a chance to call setOutputMarkupId(true). (The Behavior.onComponentTag() is called in Component.renderComponentTag() a few lines down. The behavior has to call setOutputMarkupId() earlier, like in onConfigure()

      1. WICKET-4758.patch
        4 kB
        Wolfgang Kritzinger
      2. filter-columns2.tar.gz
        21 kB
        Wolfgang Kritzinger

        Issue Links

          Activity

          Wolfgang Kritzinger created issue -
          Hide
          Jeremy Thomerson added a comment -

          This should fix it, but I don't currently have an easy way to test it. Please verify and re-open this issue if it's not fixed.

          Master: https://git-wip-us.apache.org/repos/asf?p=wicket.git;a=commit;h=c274a707c2929e853907d3bd9b64e1582c16faac

          1.5.x: https://git-wip-us.apache.org/repos/asf?p=wicket.git;a=commit;h=ac7748671472ac7d4f3f82e8801b607d3f73e5c2

          Show
          Jeremy Thomerson added a comment - This should fix it, but I don't currently have an easy way to test it. Please verify and re-open this issue if it's not fixed. Master: https://git-wip-us.apache.org/repos/asf?p=wicket.git;a=commit;h=c274a707c2929e853907d3bd9b64e1582c16faac 1.5.x: https://git-wip-us.apache.org/repos/asf?p=wicket.git;a=commit;h=ac7748671472ac7d4f3f82e8801b607d3f73e5c2
          Jeremy Thomerson made changes -
          Field Original Value New Value
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee Jeremy Thomerson [ jthomerson ]
          Fix Version/s 6.0.1 [ 12322956 ]
          Fix Version/s 1.5.9 [ 12322962 ]
          Resolution Fixed [ 1 ]
          Hide
          Wolfgang Kritzinger added a comment -

          This particular problem is solved; the id attribute is now rendered, however the FilterToolbar component still doesn't work right. It uses a RefreshingView so the markupIds of the input field change constantly after a submit, so on the next page, the JavaScript is not able to change the focus to the element again (because the HTML id attribute has changed).

          I'll attach a quickstart and a proposed patch.

          Show
          Wolfgang Kritzinger added a comment - This particular problem is solved; the id attribute is now rendered, however the FilterToolbar component still doesn't work right. It uses a RefreshingView so the markupIds of the input field change constantly after a submit, so on the next page, the JavaScript is not able to change the focus to the element again (because the HTML id attribute has changed). I'll attach a quickstart and a proposed patch.
          Hide
          Wolfgang Kritzinger added a comment -

          Basic DefaultDataTable with only one column

          Show
          Wolfgang Kritzinger added a comment - Basic DefaultDataTable with only one column
          Wolfgang Kritzinger made changes -
          Attachment filter-columns2.tar.gz [ 12545044 ]
          Hide
          Wolfgang Kritzinger added a comment -

          proposed patch against master

          Show
          Wolfgang Kritzinger added a comment - proposed patch against master
          Wolfgang Kritzinger made changes -
          Attachment WICKET-4758.patch [ 12545045 ]
          Hide
          Wolfgang Kritzinger added a comment -

          Reopening

          Show
          Wolfgang Kritzinger added a comment - Reopening
          Martin Grigorov made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Assignee Jeremy Thomerson [ jthomerson ]
          Hide
          Martijn Dashorst added a comment -

          which versions work and don't work? Rather unclear what the status is of this issue.

          Removed fix for 6.0.1 as we'll probably never release 6.0.1

          Show
          Martijn Dashorst added a comment - which versions work and don't work? Rather unclear what the status is of this issue. Removed fix for 6.0.1 as we'll probably never release 6.0.1
          Martijn Dashorst made changes -
          Fix Version/s 6.0.1 [ 12322956 ]
          Hide
          Wolfgang Kritzinger added a comment -

          I'm sorry for the lack of clarity, this issue is present in 1.5.8 and 6.0.0 (and master for that matter - the supplied patch is against master)

          Show
          Wolfgang Kritzinger added a comment - I'm sorry for the lack of clarity, this issue is present in 1.5.8 and 6.0.0 (and master for that matter - the supplied patch is against master)
          Wolfgang Kritzinger made changes -
          Affects Version/s 1.5.8 [ 12321662 ]
          Affects Version/s 1.5.0 [ 12315432 ]
          Hide
          Martijn Dashorst added a comment -

          Fixed for 6.1.0, as the patch doesn't apply to 1.5.8 and I want to release 6.1.0 now.

          Show
          Martijn Dashorst added a comment - Fixed for 6.1.0, as the patch doesn't apply to 1.5.8 and I want to release 6.1.0 now.
          Martijn Dashorst made changes -
          Fix Version/s 6.1.0 [ 12322957 ]
          Fix Version/s 1.5.9 [ 12322962 ]
          Martijn Dashorst made changes -
          Summary Fix created in WICKET-3916 is not effective DOM ids change of the input fields of FilterToolbar
          Martijn Dashorst made changes -
          Link This issue is cloned as WICKET-4784 [ WICKET-4784 ]
          Martijn Dashorst made changes -
          Status Reopened [ 4 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          16h 57m 1 Jeremy Thomerson 13/Sep/12 14:27
          Resolved Resolved Reopened Reopened
          4d 17h 33m 1 Martin Grigorov 18/Sep/12 08:01
          Reopened Reopened Closed Closed
          7d 11h 10m 1 Martijn Dashorst 25/Sep/12 19:11

            People

            • Assignee:
              Unassigned
              Reporter:
              Wolfgang Kritzinger
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development