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

          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
          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
          Hide
          Wolfgang Kritzinger added a comment -

          proposed patch against master

          Show
          Wolfgang Kritzinger added a comment - proposed patch against master
          Hide
          Wolfgang Kritzinger added a comment -

          Reopening

          Show
          Wolfgang Kritzinger added a comment - Reopening
          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
          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)
          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.

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development