API / Apache Wicket Interview questions
What is a Wicket Component?
A Component is the base building block of every Wicket UI element — a plain Java object (subclass of org.apache.wicket.Component) that represents one piece of a page: a label, a link, a form field, or a whole panel of nested components.
Each component is tied to exactly one tag in the page's HTML template through a matching wicket:id attribute, and it holds its own state (visibility, enabled/disabled, the data it renders) as a real Java field on that object rather than as loosely-typed request parameters. Components are organized into a tree: a Page is the root, and containers like Panel or Form hold child components underneath them.
Because a component is just an object, it participates in the normal Java type system — you can subclass it, override its lifecycle methods like onInitialize() or onConfigure(), and pass data into it through a constructor exactly as you would with any other object.
More Related questions...