use of org.activiti.explorer.data.LazyLoadingQuery in project Activiti by Activiti.
the class ProcessDefinitionPage method createList.
@Override
protected Table createList() {
final Table processDefinitionTable = new Table();
processDefinitionTable.addStyleName(ExplorerLayout.STYLE_PROCESS_DEFINITION_LIST);
// Set non-editable, selectable and full-size
processDefinitionTable.setEditable(false);
processDefinitionTable.setImmediate(true);
processDefinitionTable.setSelectable(true);
processDefinitionTable.setNullSelectionAllowed(false);
processDefinitionTable.setSortDisabled(true);
processDefinitionTable.setSizeFull();
LazyLoadingQuery lazyLoadingQuery = new ProcessDefinitionListQuery(repositoryService, definitionFilter);
this.processDefinitionContainer = new LazyLoadingContainer(lazyLoadingQuery, 30);
processDefinitionTable.setContainerDataSource(processDefinitionContainer);
// Listener to change right panel when clicked on a task
processDefinitionTable.addListener(new Property.ValueChangeListener() {
private static final long serialVersionUID = 1L;
public void valueChange(ValueChangeEvent event) {
Item item = processDefinitionTable.getItem(event.getProperty().getValue());
String processDefinitionId = (String) item.getItemProperty("id").getValue();
showProcessDefinitionDetail(processDefinitionId);
}
});
// Create columns
processDefinitionTable.addGeneratedColumn("icon", new ThemeImageColumnGenerator(Images.PROCESS_22));
processDefinitionTable.setColumnWidth("icon", 22);
processDefinitionTable.addContainerProperty("name", String.class, null);
processDefinitionTable.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_HIDDEN);
return processDefinitionTable;
}
use of org.activiti.explorer.data.LazyLoadingQuery in project Activiti by Activiti.
the class JobPage method createList.
@Override
protected Table createList() {
final Table jobTable = new Table();
LazyLoadingQuery jobListQuery = new JobListQuery();
jobListContainer = new LazyLoadingContainer(jobListQuery, 30);
jobTable.setContainerDataSource(jobListContainer);
// Listener to change right panel when clicked on a deployment
jobTable.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 = jobTable.getItem(event.getProperty().getValue());
if (item != null) {
String jobId = (String) item.getItemProperty("id").getValue();
setDetailComponent(new JobDetailPanel(jobId, JobPage.this));
// Update URL
ExplorerApp.get().setCurrentUriFragment(new UriFragment(JobNavigator.JOB_URL_PART, jobId));
} else {
// Nothing is selected
setDetailComponent(null);
ExplorerApp.get().setCurrentUriFragment(new UriFragment(JobNavigator.JOB_URL_PART));
}
}
});
// Create column headers
jobTable.addGeneratedColumn("icon", new ThemeImageColumnGenerator(Images.JOB_22));
jobTable.setColumnWidth("icon", 22);
jobTable.addContainerProperty("name", String.class, null);
jobTable.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_HIDDEN);
return jobTable;
}
use of org.activiti.explorer.data.LazyLoadingQuery in project Activiti by Activiti.
the class GroupDetailPanel method initMembersTable.
protected void initMembersTable() {
LazyLoadingQuery query = new GroupMembersQuery(group.getId(), this);
if (query.size() > 0) {
membersTable = new Table();
membersTable.setWidth(100, UNITS_PERCENTAGE);
membersTable.setHeight(400, UNITS_PIXELS);
membersTable.setEditable(false);
membersTable.setSelectable(false);
membersTable.setSortDisabled(false);
LazyLoadingContainer container = new LazyLoadingContainer(query, 30);
membersTable.setContainerDataSource(container);
membersTable.addContainerProperty("id", Button.class, null);
membersTable.addContainerProperty("firstName", String.class, null);
membersTable.addContainerProperty("lastName", String.class, null);
membersTable.addContainerProperty("email", String.class, null);
membersTable.addContainerProperty("actions", Component.class, null);
membersLayout.addComponent(membersTable);
} else {
noMembersTable = new Label(i18nManager.getMessage(Messages.GROUP_NO_MEMBERS));
membersLayout.addComponent(noMembersTable);
}
}
use of org.activiti.explorer.data.LazyLoadingQuery in project Activiti by Activiti.
the class ProcessInstancePage method createList.
protected Table createList() {
final Table table = new Table();
LazyLoadingQuery query = new ProcessInstanceListQuery();
processInstanceContainer = new LazyLoadingContainer(query);
table.setContainerDataSource(processInstanceContainer);
table.addListener(new Property.ValueChangeListener() {
private static final long serialVersionUID = 1L;
public void valueChange(ValueChangeEvent event) {
// the value of the property is the itemId of the table entry
Item item = table.getItem(event.getProperty().getValue());
if (item != null) {
String processInstanceId = (String) item.getItemProperty("id").getValue();
setDetailComponent(new AlfrescoProcessInstanceDetailPanel(processInstanceId, ProcessInstancePage.this));
// Update URL
ExplorerApp.get().setCurrentUriFragment(new UriFragment(ProcessInstanceNavigator.PROCESS_INSTANCE_URL_PART, processInstanceId));
} else {
// Nothing is selected
setDetailComponent(null);
ExplorerApp.get().setCurrentUriFragment(new UriFragment(ProcessInstanceNavigator.PROCESS_INSTANCE_URL_PART));
}
}
});
// Create column headers
table.addGeneratedColumn("icon", new ThemeImageColumnGenerator(Images.PROCESS_22));
table.setColumnWidth("icon", 22);
table.addContainerProperty("name", String.class, null);
table.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_HIDDEN);
return table;
}
use of org.activiti.explorer.data.LazyLoadingQuery in project Activiti by Activiti.
the class DeploymentPage method createList.
@Override
protected Table createList() {
final Table deploymentTable = new Table();
LazyLoadingQuery deploymentListQuery = new DeploymentListQuery(deploymentFilter);
deploymentListContainer = new LazyLoadingContainer(deploymentListQuery, 30);
deploymentTable.setContainerDataSource(deploymentListContainer);
// Listener to change right panel when clicked on a deployment
deploymentTable.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 = deploymentTable.getItem(event.getProperty().getValue());
if (item != null) {
String deploymentId = (String) item.getItemProperty("id").getValue();
setDetailComponent(new DeploymentDetailPanel(deploymentId, DeploymentPage.this));
// Update URL
ExplorerApp.get().setCurrentUriFragment(new UriFragment(DeploymentNavigator.DEPLOYMENT_URI_PART, deploymentId));
} else {
// Nothing is selected
setDetailComponent(null);
ExplorerApp.get().setCurrentUriFragment(new UriFragment(DeploymentNavigator.DEPLOYMENT_URI_PART));
}
}
});
// Create column headers
deploymentTable.addGeneratedColumn("icon", new ThemeImageColumnGenerator(Images.DEPLOYMENT_22));
deploymentTable.setColumnWidth("icon", 22);
deploymentTable.addContainerProperty("name", String.class, null);
deploymentTable.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_HIDDEN);
return deploymentTable;
}
Aggregations