use of org.activiti.explorer.navigation.UriFragment 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;
}
use of org.activiti.explorer.navigation.UriFragment in project Activiti by Activiti.
the class AdministrationPage method createList.
protected Table createList() {
managementTable = new Table();
managementTable.setEditable(false);
managementTable.setImmediate(true);
managementTable.setSelectable(true);
managementTable.setNullSelectionAllowed(false);
managementTable.setSortDisabled(true);
managementTable.setSizeFull();
// Column headers
managementTable.addContainerProperty("name", String.class, null);
managementTable.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_HIDDEN);
managementTable.addItem(new String[] { i18nManager.getMessage(Messages.ADMIN_MENU_RUNNING) }, 0);
managementTable.addItem(new String[] { i18nManager.getMessage(Messages.ADMIN_MENU_COMPLETED) }, 1);
managementTable.addItem(new String[] { i18nManager.getMessage(Messages.ADMIN_MENU_DATABASE) }, 2);
// Listener to change right panel when clicked on a user
managementTable.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 = managementTable.getItem(event.getProperty().getValue());
if (item != null) {
if ("0".equals(event.getProperty().getValue().toString())) {
setDetailComponent(new AdminRunningInstancesPanel());
} else if ("1".equals(event.getProperty().getValue().toString())) {
setDetailComponent(new AdminCompletedInstancesPanel());
} else if ("2".equals(event.getProperty().getValue().toString())) {
setDetailComponent(new AdminDatabaseSettingsPanel());
}
// Update URL
ExplorerApp.get().setCurrentUriFragment(new UriFragment(AdministrationNavigator.MANAGEMENT_URI_PART, event.getProperty().getValue().toString()));
} else {
// Nothing is selected
setDetailComponent(null);
ExplorerApp.get().setCurrentUriFragment(new UriFragment(AdministrationNavigator.MANAGEMENT_URI_PART, managementId));
}
}
});
return managementTable;
}
use of org.activiti.explorer.navigation.UriFragment in project Activiti by Activiti.
the class SuspendedProcessDefinitionPage method createList.
protected Table createList() {
processDefinitionTable = new Table();
processDefinitionListQuery = new SuspendedProcessDefinitionListQuery();
processDefinitionListContainer = new LazyLoadingContainer(processDefinitionListQuery);
processDefinitionTable.setContainerDataSource(processDefinitionListContainer);
// Column headers
processDefinitionTable.addContainerProperty("name", String.class, null);
processDefinitionTable.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_HIDDEN);
// Listener to change right panel when clicked on a user
processDefinitionTable.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 = processDefinitionTable.getItem(event.getProperty().getValue());
if (item != null) {
String processDefinitionId = (String) item.getItemProperty("id").getValue();
setDetailComponent(new SuspendedProcessDefinitionDetailPanel(processDefinitionId, SuspendedProcessDefinitionPage.this));
// Update URL
ExplorerApp.get().setCurrentUriFragment(new UriFragment(SuspendedProcessDefinitionNavigator.SUSPENDED_PROC_DEF_URI_PART, processDefinitionId));
} else {
// Nothing selected
setDetailComponent(null);
ExplorerApp.get().setCurrentUriFragment(new UriFragment(SuspendedProcessDefinitionNavigator.SUSPENDED_PROC_DEF_URI_PART));
}
}
});
return processDefinitionTable;
}
use of org.activiti.explorer.navigation.UriFragment in project Activiti by Activiti.
the class TaskPage method getListSelectionListener.
protected ValueChangeListener getListSelectionListener() {
return 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 = taskTable.getItem(event.getProperty().getValue());
if (item != null) {
String id = (String) item.getItemProperty("id").getValue();
setDetailComponent(createDetailComponent(id));
UriFragment taskFragment = getUriFragment(id);
ExplorerApp.get().setCurrentUriFragment(taskFragment);
} else {
// Nothing is selected
setDetailComponent(null);
taskEventPanel.setTaskId(null);
ExplorerApp.get().setCurrentUriFragment(getUriFragment(null));
}
}
};
}
use of org.activiti.explorer.navigation.UriFragment in project Activiti by Activiti.
the class EditorProcessDefinitionPage method changeUrl.
protected void changeUrl(String processDefinitionId) {
UriFragment processDefinitionFragment = new UriFragment(ProcessModelNavigator.PROCESS_MODEL_URI_PART, processDefinitionId);
ExplorerApp.get().setCurrentUriFragment(processDefinitionFragment);
}
Aggregations