Wicket
  1. Wicket
  2. WICKET-1829

MarkupComponentBorder skips first tag in MarkupStream

    Details

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

      Description

      If there is no leading markup in a MarkupComponentBorder before the <wicket:border/> tag, the following error will occur:

      Unexpected tag encountered in markup of component border TestComponentBorder. Tag: <wicket:body/>, expected tag: <wicket:border>

      Steps to reproduce:
      Create a ComponentBorder with no leading markup before <wicket:border/>:

      TestComponentBorder.html
      --------------------------------------
      <wicket:border>
      <div class="input">
      <wicket:body/>
      </div>
      </wicket:border>

      TestComponentBorder.java
      --------------------------------------
      public class TestComponentBorder extends MarkupComponentBorder
      {
      }

      This happens because the rendering loop calls stream.next(); when it starts, always skipping the first element. It should call stream.get() before the loop, then stream.next() at the end.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Igor Vaynberg
            Reporter:
            Scott MacKenzie
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development