DataView<RepositoryUrl> repoUrlMenuItems = new DataView<RepositoryUrl>("repoUrls", urlsDp) {
private static final long serialVersionUID = 1L;
@Override
public void populateItem(final Item<RepositoryUrl> item) {
RepositoryUrl repoUrl = item.getModelObject();
// repository url
Fragment fragment = new Fragment("repoUrl", "actionFragment", this);
Component content = new Label("content", repoUrl.url).setRenderBodyOnly(true);
WicketUtils.setCssClass(content, "commandMenuItem");
fragment.add(content);
item.add(fragment);
Label permissionLabel = new Label("permission", repoUrl.isExternal() ? externalPermission : repoUrl.permission.toString());
WicketUtils.setPermissionClass(permissionLabel, repoUrl.permission);
String tooltip = getProtocolPermissionDescription(repository, repoUrl);
WicketUtils.setHtmlTooltip(permissionLabel, tooltip);
fragment.add(permissionLabel);
fragment.add(createCopyFragment(repoUrl.url));