Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • <wicket:component> - Creates a Wicket component on the fly. Needs a class attribute. Though this has been in wicket for a long time, it is still kind of an unsupported feature, as most of the core developers believe that this may lead to misuse of the framework. Before heavily relying on this feature, you might want to contact the user list to discuss alternative strategies. (THIS TAG IS NOT SUPPORTED BY THE CORE TEAM)
  • <wicket:enclosure> - (since 1.3) This tag is useful for filtering markup that surrounds a component but has its visibility dependent on the visibility of that component. Lets take a simple example of where you want to show a table row, but only if a Label is visible.
    Code Block
    <tr><td class="label">Phone:</td><td><span wicket:id="phone">phone number</span></td></tr>
    <wicket:enclosure>
    <tr><td class="label">Fax:</td><td><span wicket:id="fax">fax number</span></td></tr>
    </wicket:enclosure>
    
    add(new Label("fax") { public boolean isVisible() { return getModelObjectAsString()!=null; }});
    

...