super(id);
ArrayList list = new ArrayList(Arrays.asList(Tags.values()));
ListView listView = new ListView("tagControls", new Model(list)) {
@Override
protected void populateItem(ListItem item) {
Tags tag = (Tags) item.getModelObject();
Button button = new Button("tagControl");
button.add(new org.apache.wicket.markup.html.basic.Label(
"label", new Model(tag.getName())));
button.add(new AttributeModifier("title", new Model(tag
.getDescription())));
button.add(new AttributeModifier("onClick", new Model("bbCodeInsertBBTag('"+tag.getStartBBTag()+"','"+tag.getEndBBTag()+"');")));
item.add(button);
}
};
add(listView);