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

use of replaceComponentTagBody in onComponentTag MarkupException: Tag expected

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 1.4-M3
    • 1.4-RC2
    • wicket
    • None

    Description

      Test.java
      ------------
      public class Test extends WebPage {

      public Test() {
      add(new WebMarkupContainer("test") {

      @Override
      protected void onComponentTag(ComponentTag tag)

      { replaceComponentTagBody(getMarkupStream(), tag, ""); }

      });
      }
      }

      Test.html
      ------------
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
      <html xmlns:wicket="http://wicket.apache.org/">
      <body>
      <span wicket:id="test"></span>
      </body>
      </html>

      The code above will generate a org.apache.wicket.markup.MarkupException: Tag expected. Expected behavior is to replace the component body with whatever is in the third argument of replaceComponentTagBody

      Regards
      Per

      Attachments

        Activity

          People

            ivaynberg Igor Vaynberg
            pereng Per Engström
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: