Search in sources :

Example 1 with UriFragment

use of org.activiti.explorer.navigation.UriFragment in project Activiti by Activiti.

the class TasksPage method getUriFragment.

@Override
protected UriFragment getUriFragment(String taskId) {
    UriFragment taskFragment = new UriFragment(TaskNavigator.TASK_URI_PART);
    if (taskId != null) {
        taskFragment.addUriPart(taskId);
    }
    taskFragment.addParameter(TaskNavigator.PARAMETER_CATEGORY, TaskNavigator.CATEGORY_TASKS);
    return taskFragment;
}
Also used : UriFragment(org.activiti.explorer.navigation.UriFragment)

Example 2 with UriFragment

use of org.activiti.explorer.navigation.UriFragment in project Activiti by Activiti.

the class InboxPage method getUriFragment.

@Override
protected UriFragment getUriFragment(String taskId) {
    UriFragment taskFragment = new UriFragment(TaskNavigator.TASK_URI_PART);
    if (taskId != null) {
        taskFragment.addUriPart(taskId);
    }
    taskFragment.addParameter(TaskNavigator.PARAMETER_CATEGORY, TaskNavigator.CATEGORY_INBOX);
    return taskFragment;
}
Also used : UriFragment(org.activiti.explorer.navigation.UriFragment)

Example 3 with UriFragment

use of org.activiti.explorer.navigation.UriFragment in project Activiti by Activiti.

the class QueuedPage method getUriFragment.

@Override
protected UriFragment getUriFragment(String taskId) {
    UriFragment taskFragment = new UriFragment(TaskNavigator.TASK_URI_PART);
    if (taskId != null) {
        taskFragment.addUriPart(taskId);
    }
    taskFragment.addParameter(TaskNavigator.PARAMETER_CATEGORY, TaskNavigator.CATEGORY_QUEUED);
    if (groupId != null) {
        taskFragment.addParameter(TaskNavigator.PARAMETER_GROUP, groupId);
    }
    return taskFragment;
}
Also used : UriFragment(org.activiti.explorer.navigation.UriFragment)

Example 4 with UriFragment

use of org.activiti.explorer.navigation.UriFragment in project Activiti by Activiti.

the class ActiveProcessDefinitionPage method createList.

protected Table createList() {
    processDefinitionTable = new Table();
    processDefinitionListQuery = new ActiveProcessDefinitionListQuery();
    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 ActiveProcessDefinitionDetailPanel(processDefinitionId, ActiveProcessDefinitionPage.this));
                // Update URL
                ExplorerApp.get().setCurrentUriFragment(new UriFragment(ActiveProcessDefinitionNavigator.ACTIVE_PROC_DEF_URI_PART, processDefinitionId));
            } else {
                // Nothing selected
                setDetailComponent(null);
                ExplorerApp.get().setCurrentUriFragment(new UriFragment(ActiveProcessDefinitionNavigator.ACTIVE_PROC_DEF_URI_PART));
            }
        }
    });
    return processDefinitionTable;
}
Also used : Item(com.vaadin.data.Item) ValueChangeEvent(com.vaadin.data.Property.ValueChangeEvent) Table(com.vaadin.ui.Table) LazyLoadingContainer(org.activiti.explorer.data.LazyLoadingContainer) Property(com.vaadin.data.Property) UriFragment(org.activiti.explorer.navigation.UriFragment)

Example 5 with UriFragment

use of org.activiti.explorer.navigation.UriFragment in project Activiti by Activiti.

the class ProcessDefinitionPage method changeUrl.

protected void changeUrl(String processDefinitionId) {
    UriFragment processDefinitionFragment = new UriFragment(ProcessNavigator.process_URI_PART, processDefinitionId);
    ExplorerApp.get().setCurrentUriFragment(processDefinitionFragment);
}
Also used : UriFragment(org.activiti.explorer.navigation.UriFragment)

Aggregations

UriFragment (org.activiti.explorer.navigation.UriFragment)20 ValueChangeEvent (com.vaadin.data.Property.ValueChangeEvent)13 Item (com.vaadin.data.Item)12 Property (com.vaadin.data.Property)12 Table (com.vaadin.ui.Table)12 LazyLoadingContainer (org.activiti.explorer.data.LazyLoadingContainer)10 ThemeImageColumnGenerator (org.activiti.explorer.ui.util.ThemeImageColumnGenerator)8 LazyLoadingQuery (org.activiti.explorer.data.LazyLoadingQuery)3 ValueChangeListener (com.vaadin.data.Property.ValueChangeListener)1 ProcessInstanceDetailPanel (org.activiti.explorer.ui.management.processinstance.ProcessInstanceDetailPanel)1