API / Apache Wicket Interview questions
Define markup inheritance in Wicket?
Markup inheritance lets a Wicket Page or Panel share a common HTML layout (header, navigation, footer) with subclasses, the same way Java class inheritance shares behavior — without a separate templating language.
A base page declares a <wicket:child/> tag marking where subclass-specific content should be inserted, and its Java class is written to be extended. A subclass's own HTML file then wraps its unique content in a <wicket:extend> block, and Wicket merges the two at render time: the base page's surrounding markup stays intact, and whatever sits inside wicket:extend replaces the wicket:child placeholder.
This is the standard way to avoid copy-pasting the same header and footer markup into every page of an application — a BasePage defines the shared chrome once, and every other page simply extends it in Java and supplies its own wicket:extend block in HTML.
More Related questions...