If the model is not empty, this behaves like the standard Label.
Example usage:
<span wicket:id="label">Sample</span> IModel<String> emptyModel = null; add(new LabelWithPlaceholder("label", emptyModel).setPlaceholder("N/A"));
Since the model in this example is null, the placeholder will be used, resulting in this output:
<span class="empty">N/A</span>
Notice also that {@code class="empty"} has been added. @see #setPlaceholder @see Label @since 2.0
|
|
|
|