API / Apache Wicket Interview questions
Explain the internal working of Wicket's component tree rendering?
Rendering in Wicket is a recursive walk down the component tree, where each container asks its children to render themselves against the matching markup, rather than the framework generating HTML through string templating.
Wicket parses the HTML template into an internal markup structure once (and caches it), then during rendering it streams through that structure tag by tag: plain HTML tags are copied straight through untouched, while any tag carrying a wicket:id triggers a lookup for the matching child component, which is then asked to contribute its own rendered output at that exact point in the stream.
Container components (like Panel or Form) repeat this same process recursively for their own markup and children, which is what lets an arbitrarily deep tree of nested Panels and Fragments all resolve correctly — each level only has to know how to render its own immediate markup and children, not the whole page at once.
More Related questions...