Affects Version/s: 8.1.0
Fix Version/s: None
We are in the process of upgrading a Wicket 6.x application to Wicket 8.1, mostly because we needed stateless ajax.
In the process we discovered something quite unexpected (took a few days to figure out the cause).
This is the issue:
Hierarchy like so:
The label should only be visible when it's model has data, so we override onConfigure and set visible = (getDefaultModelObject != null).
This works if all components are added with add(Component).
It also works if all components are added with queue(Component).
BUT, if the container is added with add(Component) and the AjaxButton is added with queue(Component), it doesn't work.
Actually, if just one component is added to the page with queue(Component), things seem to work (as long as it is queue-ed AFTER the container is add-ed)
I could not find any information on dangers of mixing add/queue with my google-fu, so it may look like it's a bug?
Attached quickstart that shows the issue.