}
private void setupResources() {
List<IColumn<ResourceTO, String>> columns = new ArrayList<IColumn<ResourceTO, String>>();
columns.add(new PropertyColumn(new StringResourceModel("name", this, null), "name", "name"));
columns.add(new AbstractColumn<ResourceTO, String>(
new StringResourceModel("connector", this, null, "connector")) {
private static final long serialVersionUID = 8263694778917279290L;
@Override
public void populateItem(final Item<ICellPopulator<ResourceTO>> cellItem, final String componentId,
final IModel<ResourceTO> rowModel) {
final AjaxLink<String> editLink = new ClearIndicatingAjaxLink<String>("link", getPageReference()) {
private static final long serialVersionUID = -7978723352517770644L;
@Override
protected void onClickInternal(final AjaxRequestTarget target) {
editConnectorWin.setPageCreator(new ModalWindow.PageCreator() {
private static final long serialVersionUID = -7834632442532690940L;
@Override
public Page createPage() {
return new ConnectorModalPage(Resources.this.getPageReference(), editConnectorWin,
connectorRestClient.read(rowModel.getObject().getConnectorId()));
}
});
editConnectorWin.show(target);
}
};
editLink.add(new Label("linkTitle", rowModel.getObject().getConnectorDisplayName()));
LinkPanel editConnPanel = new LinkPanel(componentId);
editConnPanel.add(editLink);
cellItem.add(editConnPanel);
MetaDataRoleAuthorizationStrategy.authorize(editConnPanel, ENABLE, xmlRolesReader.getAllAllowedRoles(
"Connectors", "read"));
}
});
columns.add(new PropertyColumn(new StringResourceModel(
"propagationPrimary", this, null), "propagationPrimary", "propagationPrimary"));
columns.add(new PropertyColumn(new StringResourceModel(
"propagationPriority", this, null), "propagationPriority", "propagationPriority"));
columns.add(new AbstractColumn<ResourceTO, String>(new StringResourceModel("actions", this, null, "")) {
private static final long serialVersionUID = 2054811145491901166L;