Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-721

MarkupException using <wicket:message> tags in a fragment

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.2.6, 1.3.0-beta1, 1.3.0-beta2
    • 1.3.0-beta3
    • wicket
    • None
    • Windows XP, JDK 1.5.0_11, Jetty 6

    Description

      When using a <wicket:message> tag in a fragment, a MarkupException is thrown.

      Exception stack trace:
      ---------------------------------

      [2007-07-04 10:05:49,937]<ERROR>[RequestCycle] Method renderComponent called on bad markup element: </div>
      [markup = file:/C:/work/projects/collection/collection-webapp/target/classes/test/FragmentTestPanel.html
      <html xmlns:wicket="http://wicket.apache.org">
      <body>

      <wicket:panel>
      <div wicket:id="test">[test fragment goes here]</div><br />
      </wicket:panel>

      <wicket:fragment wicket:id="testFrag">
      <wicket:message key="message.test">[test message]</wicket:message>
      <br />
      <span wicket:id="label">[test label]</span>
      </wicket:fragment>

      </body>
      </html>
      , index = 7, current = '</div>' (line 5, column 49)]
      org.apache.wicket.markup.MarkupException: Method renderComponent called on bad markup element: </div>
      [markup = file:/C:/work/projects/collection/collection-webapp/target/classes/test/FragmentTestPanel.html
      <html xmlns:wicket="http://wicket.apache.org">
      <body>

      <wicket:panel>
      <div wicket:id="test">[test fragment goes here]</div><br />
      </wicket:panel>

      <wicket:fragment wicket:id="testFrag">
      <wicket:message key="message.test">[test message]</wicket:message>
      <br />
      <span wicket:id="label">[test label]</span>
      </wicket:fragment>

      </body>
      </html>
      , index = 7, current = '</div>' (line 5, column 49)]
      at org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStream.java:426)
      at org.apache.wicket.Component.renderComponent(Component.java:2089)
      at org.apache.wicket.markup.html.WebComponent.onRender(WebComponent.java:60)
      at org.apache.wicket.Component.render(Component.java:1941)
      at org.apache.wicket.Component.render(Component.java:1904)
      at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:223)
      at org.apache.wicket.markup.resolver.WicketMessageResolver.resolve(WicketMessageResolver.java:103)
      at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1206)
      at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1349)
      at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1284)
      at org.apache.wicket.markup.html.panel.Fragment.renderFragment(Fragment.java:268)
      at org.apache.wicket.markup.html.panel.Fragment.onComponentTagBody(Fragment.java:198)
      at org.apache.wicket.Component.renderComponent(Component.java:2114)
      at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1294)
      at org.apache.wicket.Component.render(Component.java:1941)
      at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1179)
      at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1349)
      at org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:629)
      at org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:107)
      at org.apache.wicket.Component.renderComponent(Component.java:2114)
      at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1294)
      at org.apache.wicket.Component.render(Component.java:1941)
      at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1179)
      at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1349)
      at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1284)
      at org.apache.wicket.Component.renderComponent(Component.java:2114)
      at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1294)
      at org.apache.wicket.Component.render(Component.java:1941)
      at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1179)
      at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1311)
      at org.apache.wicket.Page.onRender(Page.java:1422)
      at org.apache.wicket.Component.render(Component.java:1941)
      at org.apache.wicket.Page.renderPage(Page.java:927)
      at org.apache.wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:64)
      at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:103)
      at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1037)
      at org.apache.wicket.RequestCycle.step(RequestCycle.java:1107)
      at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1176)
      at org.apache.wicket.RequestCycle.request(RequestCycle.java:499)
      at org.apache.wicket.protocol.http.MockWebApplication.processRequestCycle(MockWebApplication.java:385)
      at org.apache.wicket.protocol.http.MockWebApplication.processRequestCycle(MockWebApplication.java:372)
      at org.apache.wicket.util.tester.BaseWicketTester.executeListener(BaseWicketTester.java:224)
      at org.apache.wicket.util.tester.BaseWicketTester.startPage(BaseWicketTester.java:209)
      at org.apache.wicket.util.tester.BaseWicketTester.startPanel(BaseWicketTester.java:344)
      at test.FragmentTestCase.testFragments(FragmentTestCase.java:24)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at junit.framework.TestCase.runTest(TestCase.java:154)
      at junit.framework.TestCase.runBare(TestCase.java:127)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:118)
      at junit.framework.TestSuite.runTest(TestSuite.java:208)
      at junit.framework.TestSuite.run(TestSuite.java:203)
      at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

      Attachments

        1. testcase.zip
          1 kB
          Huergo Perez
        2. WICKET-721_1.2.x.patch.txt
          3 kB
          Mike Perham

        Activity

          People

            jdonnerstag Juegen Donnerstag
            huergoperez Huergo Perez
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: