{
return getRepo();
}
};
final PageableListView listview = new PageableListView("repositories",
getRepo, 10)
{
private static final long serialVersionUID = 1L;
// This method is called for each 'entry' in the list.
@Override
protected void populateItem(final ListItem item)
{
final PortletApplication application = (PortletApplication) item
.getModelObject();
item.add(new Label("groupId", application.getGroupId()));
item.add(new Label("artifactId", application.getArtifactId()));
item.add(new Label("name", application.getName()));
item.add(new Label("version", application.getVersion()));
item.add(new Label("type", application.getPackaging()));
Link actionLink = new Link("action", item.getModel())
{
public void onClick()
{
PortletApplication portletApplication = (PortletApplication) getModelObject();
deployer.deploy(portletApplication, getServiceLocator()
.getDeploymentManager());
}
};
actionLink.setVisibilityAllowed(true);
actionLink.setOutputMarkupId(true);
if(deployer.getStatus() == PortletDeployer.DEPLOYING)
{
actionLink.setVisible(false);
}
item.add(actionLink);
}
};
listview.setOutputMarkupId(true);
final WebMarkupContainer tableGroup = new WebMarkupContainer("tableGroup");
tableGroup.setOutputMarkupId(true);
//tableGroup.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(5)));
tableGroup.add(new PagingNavigator("navigator", listview));
tableGroup.add(listview);