use of org.activiti.explorer.ui.management.processinstance.ProcessInstanceDetailPanel in project Activiti by Activiti.
the class ProcessInstancePage method createList.
@Override
protected Table createList() {
final Table processInstanceTable = new Table();
processInstanceTable.addStyleName(ExplorerLayout.STYLE_PROCESS_INSTANCE_LIST);
// Listener to change right panel when clicked on a process instance
processInstanceTable.addListener(new Property.ValueChangeListener() {
private static final long serialVersionUID = 8811553575319455854L;
public void valueChange(ValueChangeEvent event) {
// the value of the property is the itemId of the table entry
Item item = processInstanceTable.getItem(event.getProperty().getValue());
if (item != null) {
String processInstanceId = (String) item.getItemProperty("id").getValue();
setDetailComponent(new ProcessInstanceDetailPanel(processInstanceId, ProcessInstancePage.this));
UriFragment taskFragment = getUriFragment(processInstanceId);
ExplorerApp.get().setCurrentUriFragment(taskFragment);
} else {
// Nothing is selected
setDetailComponent(null);
UriFragment taskFragment = getUriFragment(null);
ExplorerApp.get().setCurrentUriFragment(taskFragment);
}
}
});
this.lazyLoadingQuery = createLazyLoadingQuery();
this.processInstanceListContainer = new LazyLoadingContainer(lazyLoadingQuery, 30);
processInstanceTable.setContainerDataSource(processInstanceListContainer);
// Create column header
processInstanceTable.addGeneratedColumn("icon", new ThemeImageColumnGenerator(Images.PROCESS_22));
processInstanceTable.setColumnWidth("icon", 22);
processInstanceTable.addContainerProperty("name", String.class, null);
processInstanceTable.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_HIDDEN);
return processInstanceTable;
}
Aggregations