Wicket Remove


[back to the reference]

You can view Borders as kind of the opposite of Panels. You use Borders to decorate other components/ markup. This allows you to combine loosely coupled components into larger blocks. An example of this is the FormComponentFeedbackBorder components that you can put around e.g. input fields (TextField) so that when there was a validation error for that field on a form submit, the border displays its' red star marker as a hint to the user.

You can also use Borders for templating techniques much the same as you can use markup inheritance. See the library example for an example of that usage. Like Panels, you can nest arbitrairy components in a Border, including other panels and borders.

before the border contents
I am the label
after the border contents

Behind the Scenes

Example HTML

<span wicket:id="border" class="mark">
<span wicket:id="label" class="mark">label contents here</span>

Example Code

    public BorderPage()
        Label label = new Label("label", "I am the label");
        MyBorder border = new MyBorder("border");

Further examples & and comments/explanations may be available in the source code.