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

IllegalArgument exception with wicket:child in ajaxrequest

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 6.16.0, 6.17.0
    • 6.18.0, 7.0.0-M4
    • wicket
    • None

    Description

      We have a page in our application with a DataView.
      In this DataView we have an anonymous inner class of a component which has a wicket:child-tag.
      When there is ajaxrequest, in our case because we want to go to the next page in our dataview, an exception is thrown.

      java.lang.IllegalArgumentException: Argument 'streamOffset' must have a value within [0,0], but was 1

      at org.apache.wicket.util.lang.Args.withinRange(Args.java:120)

      at org.apache.wicket.markup.AbstractMarkupFragment.find(AbstractMarkupFragment.java:43)

      at org.apache.wicket.markup.MarkupFragment.find(MarkupFragment.java:150)

      at org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.getMarkup(DefaultMarkupSourcingStrategy.java:94)

      at org.apache.wicket.MarkupContainer.getMarkup(MarkupContainer.java:451)

      at org.apache.wicket.markup.html.panel.AbstractMarkupSourcingStrategy$1.component(AbstractMarkupSourcingStrategy.java:72)

      at org.apache.wicket.markup.html.panel.AbstractMarkupSourcingStrategy$1.component(AbstractMarkupSourcingStrategy.java:66)

      I have the feeling that is caused by the fix in the following jira-issue
      https://issues.apache.org/jira/browse/WICKET-5580

      When we remove the wicket:child-tag completely, there is no problem.
      When we change the anonymous inner class, to a nested class and give it an html-file with wicket:extend-tags without anything between them, it also works.

      I believe that the fix for WICKET-5580, failed to take in account subclasses of components that don't need to add markup and therefor don't have their own HTML-file.

      I hope I can get around to making a quickstart testcase for this in the next couple of days

      Attachments

        Issue Links

          Activity

            People

              jesselong Jesse Long
              roeloffzen Ted Roeloffzen
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: