Wicket
  1. Wicket
  2. WICKET-1789

Border fails to render if its contents are not visible by default

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4-M3
    • Fix Version/s: 1.3.5, 1.4-RC1
    • Component/s: wicket
    • Labels:
      None

      Description

      If the "contents" -element is visible=false during the first time the page is loaded, Wicket crashes

      <wicket:border>
      <fieldset style="padding: 0px;">
      <legend>
      <input type="button" wicket:id="toggle_contents_button" value="Click here to show/hide">
      <span wicket:id="legend"></span>
      </legend>

      <span wicket:id="contents">
      <wicket:body />
      </span>

      </fieldset>

      </wicket:border>

      Unexpected RuntimeException:

      WicketMessage: Expected close tag for <span id="show_hide_bordera" wicket:id="show-hide-border">
      [markup = file:/C:/workspaces/testspace/border-bug/target/classes/org/wicket/quickstart/HomePage.html
      <html>
      <head>
      <title>Wicket Quickstart Archetype Homepage</title>
      </head>
      <body>
      <strong>Wicket Quickstart Archetype Homepage</strong>
      <br/><br/>
      <span wicket:id="message">message will be here</span>
      Show-hide -content:
      <form wicket:id="form">
      <span wicket:id="show-hide-border">Rendering the border crashes if its contents are hidden by default.</span>
      </form>
      </body>
      </html>

      , index = 12, current = [Raw markup]]

      Root cause:

      org.apache.wicket.markup.MarkupException: Expected close tag for <span id="show_hide_bordera" wicket:id="show-hide-border">
      [markup = file:/C:/workspaces/testspace/border-bug/target/classes/org/wicket/quickstart/HomePage.html

        Activity

        Hide
        Martin Makundi added a comment -

        Quickstart application for reproducing the border bug.

        Try running it and it should crash.

        However, if you adjust the border contents to be visible by default (HomePage.java and ShowHideBorder constructor), it will render just fine and continue operating. This suggests to me that it is a bug as it fails only if the contents are hidden by default.

        Show
        Martin Makundi added a comment - Quickstart application for reproducing the border bug. Try running it and it should crash. However, if you adjust the border contents to be visible by default (HomePage.java and ShowHideBorder constructor), it will render just fine and continue operating. This suggests to me that it is a bug as it fails only if the contents are hidden by default.

          People

          • Assignee:
            Igor Vaynberg
            Reporter:
            Martin Makundi
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 5m
              5m
              Remaining:
              Remaining Estimate - 5m
              5m
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development