Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: linked to Panel, singular title

Fragments are effectively in-line panels Panels, i.e. they provide a way to maintain a panel's piece of markup within the parent's markup file.

They're just there to help with the cases where you don't need to share the panel contents between different pages but are just using them on a single page. In other words, they're a convinience feature for people to embed repeating but non-reusable pieces of markup into the parent's markup file.

Example

e.g. You have a target myPanel

...

which will result in the markup from frag 1 being rendered, i.e. panel 1

Note

If the component that you are putting the fragment in is a subclass, the fragment's markup must be inside the <wicket:extend></wicket:extend> tag:

...