List of usage examples for org.apache.wicket.markup.html.basic EnumLabel setOutputMarkupId
public final Component setOutputMarkupId(final boolean output)
From source file:de.alpharogroup.wicket.components.factory.ComponentFactory.java
License:Apache License
/** * Factory method for create a new {@link EnumLabel}. * * @param <T>/*from w w w .j a v a 2 s.c o m*/ * the generic type of the model * @param id * the id * @param model * the model of the label * @return the new {@link EnumLabel}. */ public static <T extends Enum<T>> EnumLabel<T> newEnumLabel(final String id, final IModel<T> model) { final EnumLabel<T> enumLabel = new EnumLabel<T>(id, model) { /** The serialVersionUID. */ private static final long serialVersionUID = 1L; /** * {@inheritDoc} */ @Override protected String resourceKey(final T value) { return value.name(); } }; enumLabel.setOutputMarkupId(true); return enumLabel; }