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;
	}
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 ) { private static final long serialVersionUID = 1L ; @ Override protected String resourceKey ( final T value ) { return value . name ( ) ; } } ; enumLabel . setOutputMarkupId ( true ) ; return enumLabel ; }
Factory method for create a new {@link EnumLabel}.

@param <T>
the generic type of the model
@param id
the id
@param model
the model of the label
@return the new {@link EnumLabel}.