public void initDefaultFilters(GridGlobalPreferences preferences, Button createTabButton) { List<String> states = new ArrayList<String>(); presenter.setAddingDefaultFilters(true); // Filter status Active states.add(String.valueOf(ProcessInstance.STATE_ACTIVE)); initTabFilter( preferences, "ProcessInstancesGrid_0", Constants.INSTANCE.Active(), "Filter " + Constants.INSTANCE.Active(), states, "", ""); // Filter status completed states = new ArrayList<String>(); states.add(String.valueOf(ProcessInstance.STATE_COMPLETED)); initTabFilter( preferences, "ProcessInstancesGrid_1", Constants.INSTANCE.Completed(), "Filter " + Constants.INSTANCE.Completed(), states, "", ""); filterPagedTable.addAddTableButton(createTabButton); presenter.setAddingDefaultFilters(false); applyFilterOnPresenter("ProcessInstancesGrid_1"); }
private void createFilterForm() { HashMap<String, String> stateListBoxInfo = new HashMap<String, String>(); stateListBoxInfo.put(String.valueOf(ProcessInstance.STATE_ACTIVE), Constants.INSTANCE.Active()); stateListBoxInfo.put( String.valueOf(ProcessInstance.STATE_COMPLETED), Constants.INSTANCE.Completed()); stateListBoxInfo.put( String.valueOf(ProcessInstance.STATE_ABORTED), Constants.INSTANCE.Aborted()); stateListBoxInfo.put( String.valueOf(ProcessInstance.STATE_PENDING), Constants.INSTANCE.Pending()); stateListBoxInfo.put( String.valueOf(ProcessInstance.STATE_SUSPENDED), Constants.INSTANCE.Suspended()); newTabFilterPopup.init(); newTabFilterPopup.addListBoxToFilter( Constants.INSTANCE.State(), ProcessInstanceListPresenter.FILTER_STATE_PARAM_NAME, true, stateListBoxInfo); newTabFilterPopup.addTextBoxToFilter( Constants.INSTANCE.Process_Definitions(), ProcessInstanceListPresenter.FILTER_PROCESS_DEFINITION_PARAM_NAME, ""); newTabFilterPopup.addTextBoxToFilter( Constants.INSTANCE.Initiator(), ProcessInstanceListPresenter.FILTER_INITIATOR_PARAM_NAME); }
@Override public IsWidget getOptionsButton() { return new DropdownButton(Constants.INSTANCE.Options()) { { setSize(MINI); setRightDropdown(true); add( new NavLink(Constants.INSTANCE.View_Process_Instances()) { { addClickHandler( new ClickHandler() { @Override public void onClick(ClickEvent event) { presenter.viewProcessInstances(); } }); } }); add( new NavLink(Constants.INSTANCE.View_Process_Model()) { { addClickHandler( new ClickHandler() { @Override public void onClick(ClickEvent event) { presenter.goToProcessDefModelPopup(); } }); } }); } }; }
@Override public void initTabs() { tabPanel.addTab("Definition Details", Constants.INSTANCE.Definition_Details()); tabPanel.setHeight("600px"); }
@WorkbenchMenu public Menus getMenus() { return MenuFactory.newTopLevelMenu(Constants.INSTANCE.New_Process_Instance()) .respondsWith( new Command() { @Override public void execute() { newProcessInstancePopup.show(); } }) .endMenu() .newTopLevelCustomMenu( new MenuFactory.CustomMenuBuilder() { @Override public void push(MenuFactory.CustomMenuBuilder element) {} @Override public MenuItem build() { return new BaseMenuCustom<IsWidget>() { @Override public IsWidget build() { menuRefreshButton.addClickHandler( new ClickHandler() { @Override public void onClick(ClickEvent clickEvent) { refreshGrid(); } }); return menuRefreshButton; } @Override public boolean isEnabled() { return true; } @Override public void setEnabled(boolean enabled) {} @Override public String getSignatureId() { return "org.jbpm.console.ng.pr.client.editors.instance.list.ProcessInstanceListPresenter#menuRefreshButton"; } }; } }) .endMenu() .newTopLevelCustomMenu(refreshSelectorMenuBuilder) .endMenu() .newTopLevelCustomMenu(resetFiltersMenuBuilder) .endMenu() .build(); }
public void initExtraButtons( final ExtendedPagedTable<ProcessInstanceSummary> extendedPagedTable) { Button newInstanceButton = new Button(); newInstanceButton.setTitle(constants.New_Instance()); newInstanceButton.setIcon(IconType.PLUS); newInstanceButton.setTitle(Constants.INSTANCE.New_Instance()); newInstanceButton.addClickHandler( new ClickHandler() { @Override public void onClick(ClickEvent event) { newProcessInstancePopup.show(); } }); extendedPagedTable.getRightActionsToolbar().add(newInstanceButton); }