BTW, here the whole code of the palette creationg:
private CustomPalette newSelectedSection(final Form form) {
final RolesCoverageDasboard rolesCoverageDasboard =
(RolesCoverageDasboard) getModelObject();
final IChoiceRenderer choiceRenderer = new
ChoiceRenderer("getConfigurationName", "getConfigurationName");
final IModel allConfigurationsModel = new AbstractReadOnlyModel() {
// Model for choices
private static final long serialVersionUID = 1L;
@Override
public Object getObject() {
final List<Configuration> allConfigsFromMap;
if (rolesCoverageDasboard.getUniverse() == null) {
allConfigsFromMap = Collections.emptyList();
return allConfigsFromMap;
}
allConfigsFromMap =
universesConfigurationsMap.get(rolesCoverageDasboard.getUniverse());
final List<Configuration> configsForPalette = new
ArrayList<Configuration>(allConfigsFromMap);
configsForPalette.remove(rolesCoverageDasboard.getMainConfiguration());
return configsForPalette;
}
};
final CustomPalette palette = new CustomPalette("palette", new
PropertyModel(rolesCoverageDasboard,
"comparedConfigurations"), allConfigurationsModel,
choiceRenderer, 10, true);
palette.setOutputMarkupId(true);
form.add(palette);
return palette;
}
It is very similar to yours. (list etc.)
Eyal Golan
[email protected]
Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74
P Save a tree. Please don't print this e-mail unless it's really necessary