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
- is broken by
-
WICKET-5580 Allow markup to find child fragments when wicket:child is inside a component tag
- Resolved