com.premiumminds.webapp.wicket.bootstrap.crudifier.LabelProperty Maven / Gradle / Ivy
/**
* Copyright (C) 2014 Premium Minds.
*
* This file is part of pm-wicket-utils.
*
* pm-wicket-utils is free software: you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* pm-wicket-utils is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with pm-wicket-utils. If not, see .
*/
package com.premiumminds.webapp.wicket.bootstrap.crudifier;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.model.IModel;
public abstract class LabelProperty extends Label {
private static final long serialVersionUID = 4465124169249526543L;
private IModel> model;
private Map, IObjectRenderer>> renderers;
public LabelProperty(String id, final IModel> model, Map, IObjectRenderer>> renderers) {
super(id);
this.model = model;
this.renderers = renderers;
}
@Override
protected void onInitialize() {
super.onInitialize();
setDefaultModel(new IModel