Skip to content

Commit

Permalink
AuditLog Viewer: change/add columns to log table
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-lizner committed Oct 22, 2016
1 parent 043016c commit 498cd29
Showing 1 changed file with 31 additions and 23 deletions.
Expand Up @@ -340,30 +340,13 @@ public void populateItem(Item<ICellPopulator<AuditEventRecordType>> item, String
};
columns.add(initiatorRefColumn);

IColumn<AuditEventRecordType, String> taskIdentifierColumn = new PropertyColumn<AuditEventRecordType, String>(
createStringResource("AuditEventRecordType.taskIdentifier"), "taskIdentifier");
columns.add(taskIdentifierColumn);
IColumn<AuditEventRecordType, String> eventStageColumn = new PropertyColumn<AuditEventRecordType, String>(
createStringResource("PageAuditLogViewer.eventStageLabel"), "eventStage");
columns.add(eventStageColumn);

IColumn<AuditEventRecordType, String> channelColumn = new PropertyColumn<AuditEventRecordType, String>(
createStringResource("AuditEventRecordType.channel"), "channel") {
private static final long serialVersionUID = 1L;

@Override
public void populateItem(Item<ICellPopulator<AuditEventRecordType>> item, String componentId,
IModel<AuditEventRecordType> rowModel) {
AuditEventRecordType auditEventRecordType = (AuditEventRecordType) rowModel.getObject();
String channel = auditEventRecordType.getChannel();
if (channel != null) {
QName channelQName = QNameUtil.uriToQName(channel);
String return_ = channelQName.getLocalPart();
item.add(new Label(componentId, return_));
} else {
item.add(new Label(componentId, ""));
}
item.add(new AttributeModifier("style", new Model<String>("width: 10%;")));
}
};
columns.add(channelColumn);
IColumn<AuditEventRecordType, String> eventTypeColumn = new PropertyColumn<AuditEventRecordType, String>(
createStringResource("PageAuditLogViewer.eventTypeLabel"), "eventType");
columns.add(eventTypeColumn);

PropertyColumn<AuditEventRecordType, String> targetRefColumn = new PropertyColumn<AuditEventRecordType, String>(createStringResource("AuditEventRecordType.targetRef"),
AuditEventRecordType.F_TARGET_REF.getLocalPart()) {
Expand Down Expand Up @@ -391,6 +374,31 @@ public void populateItem(Item<ICellPopulator<AuditEventRecordType>> item, String
};
columns.add(targetOwnerRefColumn);

IColumn<AuditEventRecordType, String> channelColumn = new PropertyColumn<AuditEventRecordType, String>(
createStringResource("AuditEventRecordType.channel"), "channel") {
private static final long serialVersionUID = 1L;

@Override
public void populateItem(Item<ICellPopulator<AuditEventRecordType>> item, String componentId,
IModel<AuditEventRecordType> rowModel) {
AuditEventRecordType auditEventRecordType = (AuditEventRecordType) rowModel.getObject();
String channel = auditEventRecordType.getChannel();
if (channel != null) {
QName channelQName = QNameUtil.uriToQName(channel);
String return_ = channelQName.getLocalPart();
item.add(new Label(componentId, return_));
} else {
item.add(new Label(componentId, ""));
}
item.add(new AttributeModifier("style", new Model<String>("width: 10%;")));
}
};
columns.add(channelColumn);

IColumn<AuditEventRecordType, String> outcomeColumn = new PropertyColumn<AuditEventRecordType, String>(
createStringResource("PageAuditLogViewer.outcomeLabel"), "outcome");
columns.add(outcomeColumn);

return columns;
}

Expand Down

0 comments on commit 498cd29

Please sign in to comment.