MarkupComponentBorder skips first tag in MarkupStream
-----------------------------------------------------
Key: WICKET-1829
URL: https://issues.apache.org/jira/browse/WICKET-1829
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 1.3.4
Reporter: Scott MacKenzie
Priority: Minor
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
com.cucbc.wicket.component.input.MDFieldBorder. 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 MDFieldBorder 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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.