Wicket Remove
compref
Source code

wicket.markup.html.panel.Fragment

[back to the reference]

Use fragments for inline panels..

A fragment is like a panel, but can be 'inlined', meaning it does not need it's own markup file, but can be defined in the markup file of another. For this example, we use the parent's markup file as the host, and we do not explicitly tell the fragment which host to use.
Like panels, fragments can contain arbitrairy components, like this label: yep, this is from a component proper, or
even another panel: Contents of another panel. .


Behind the Scenes

Example HTML

<wicket:fragment wicket:id="fragmentid">...</wicket:fragment>

Example Code

private class MyFragment extends Fragment {
...
add(new MyFragment("fragment", "fragmentid"));

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