use of org.activiti.explorer.ui.content.AttachmentDetailPopupWindow in project Activiti by Activiti.
the class TaskRelatedContentComponent method showAttachmentDetail.
public void showAttachmentDetail(Attachment attachment) {
// Show popup window with detail of attachment rendered in in
AttachmentDetailPopupWindow popup = new AttachmentDetailPopupWindow(attachment);
ExplorerApp.get().getViewManager().showPopupWindow(popup);
}
use of org.activiti.explorer.ui.content.AttachmentDetailPopupWindow in project Activiti by Activiti.
the class HistoricTaskDetailPanel method populateRelatedContent.
protected void populateRelatedContent(Table table, List<Attachment> attachments) {
if (!attachments.isEmpty()) {
table.setVisible(true);
}
for (Attachment attachment : attachments) {
AttachmentRenderer renderer = attachmentRendererManager.getRenderer(attachment);
Item attachmentItem = table.addItem(attachment.getId());
// Simple renderer that just shows a popup window with the attachment
RelatedContentComponent relatedContentComponent = new RelatedContentComponent() {
public void showAttachmentDetail(Attachment attachment) {
AttachmentDetailPopupWindow popup = new AttachmentDetailPopupWindow(attachment);
ExplorerApp.get().getViewManager().showPopupWindow(popup);
}
};
attachmentItem.getItemProperty("name").setValue(renderer.getOverviewComponent(attachment, relatedContentComponent));
attachmentItem.getItemProperty("type").setValue(new Embedded(null, renderer.getImage(attachment)));
}
table.setPageLength(table.size());
}
Aggregations