Wicket
  1. Wicket
  2. WICKET-3842

The wicket:enclosure attribute doesn't work properly

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.17
    • Fix Version/s: 1.4.18
    • Component/s: wicket
    • Labels:
      None

      Description

      When the hidden child becomes visible again, it fails to appear on the page. The same thing works correctly with the wicket:enclosure tag.

      Example code:

      public class TestPage extends WebPage {
      public TestPage() {
      final Label l = new Label("msg", "hi");
      add(l);
      add(new Link<Void>("b") {
      private static final long serialVersionUID = 1L;

      @Override
      public void onClick()

      { l.setVisible(!l.isVisible()); }

      });
      }
      }

      TestPage.html:

      <html xmlns:wicket>
      <body>
      <div wicket:enclosure="msg"><span wicket:id="msg"></span></div>
      <input type="button" value="Toggle" wicket:id="b">
      </body>
      </html>

      1. patch.txt
        2 kB
        Igor Vaynberg
      2. wicket-1.4.x-3842.patch
        5 kB
        Juergen Donnerstag

        Activity

        Hide
        Martin Grigorov added a comment -

        +1

        Show
        Martin Grigorov added a comment - +1
        Hide
        Igor Vaynberg added a comment -

        +1 to apply

        Show
        Igor Vaynberg added a comment - +1 to apply
        Hide
        Juergen Donnerstag added a comment -

        The patch requires changes which are allowed in 1.4 only to fix severe bugs. On the other hand inline enclosures have only been added recently to 1.4. I suggest to apply the patch.

        Show
        Juergen Donnerstag added a comment - The patch requires changes which are allowed in 1.4 only to fix severe bugs. On the other hand inline enclosures have only been added recently to 1.4. I suggest to apply the patch.
        Hide
        Martin Grigorov added a comment -

        It's not fixed in 1.4.x.

        Show
        Martin Grigorov added a comment - It's not fixed in 1.4.x.
        Hide
        Juergen Donnerstag added a comment -

        this has been fixed in 1.5 with WICKET-3833

        Show
        Juergen Donnerstag added a comment - this has been fixed in 1.5 with WICKET-3833
        Hide
        Martin Grigorov added a comment -

        The test is added to 1.5.x to protect from regressions.

        Show
        Martin Grigorov added a comment - The test is added to 1.5.x to protect from regressions.
        Hide
        Igor Vaynberg added a comment -

        attaching a patch with a failing unit test, dont have time right now to fix the actual problem...

        Show
        Igor Vaynberg added a comment - attaching a patch with a failing unit test, dont have time right now to fix the actual problem...
        Hide
        Adrian Sandor added a comment -

        Is it going to be fixed in 1.4?

        Show
        Adrian Sandor added a comment - Is it going to be fixed in 1.4?
        Hide
        Martin Grigorov added a comment -

        No problems in 1.5.

        Show
        Martin Grigorov added a comment - No problems in 1.5.

          People

          • Assignee:
            Juergen Donnerstag
            Reporter:
            Adrian Sandor
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development