DTGOV-209 Update the ProcessesPage UI to also include deployed workflows... #232

Merged
merged 1 commit into from Sep 17, 2014

Conversation

Projects
None yet
2 participants
checkAuthorization();
Configuration dtgov_ui_conf = config.getConfiguration();
SrampAtomApiClient client = _srampClientAccessor.getClient();
- Set<String> workflows = new HashSet<String>();
+ Set<Workflow> workflows = new HashSet<Workflow>();

This comment has been minimized.

@EricWittmann

EricWittmann Sep 15, 2014

Member

Can you switch this from Set to List? You are losing the sort order here. The 'getWorkflowTypes()' method should have the following signature:

public List<Workflow> getWorkflowTypes() throws DtgovUiException;
@EricWittmann

EricWittmann Sep 15, 2014

Member

Can you switch this from Set to List? You are losing the sort order here. The 'getWorkflowTypes()' method should have the following signature:

public List<Workflow> getWorkflowTypes() throws DtgovUiException;
+ if (data != null && data.size() > 0) {
+ for (Workflow workflowBean : data) {
+ this.workflowsTable.addRow(workflowBean);
+ }

This comment has been minimized.

@EricWittmann

EricWittmann Sep 16, 2014

Member

This should just call "setValue()" on the workflowsTable. That's the reason for the widget to implement the HasValue interface to begin with. The addRow() method should not be visible and should not be called. There should be no need to call "clear()" here either - the method should just be this:

protected void updateWorkflowsTable(List<Workflow> data) {
    this.workflowsSearchInProgressMessage.setVisible(false);
    if (data != null && data.size() > 0) {
        this.workflowsTable.setValue(data);
        this.workflowsTable.setVisible(true);
    } else {
        this.workflowsNoDataMessage.setVisible(true);
    }
}
@EricWittmann

EricWittmann Sep 16, 2014

Member

This should just call "setValue()" on the workflowsTable. That's the reason for the widget to implement the HasValue interface to begin with. The addRow() method should not be visible and should not be called. There should be no need to call "clear()" here either - the method should just be this:

protected void updateWorkflowsTable(List<Workflow> data) {
    this.workflowsSearchInProgressMessage.setVisible(false);
    if (data != null && data.size() > 0) {
        this.workflowsTable.setValue(data);
        this.workflowsTable.setVisible(true);
    } else {
        this.workflowsNoDataMessage.setVisible(true);
    }
}

EricWittmann added a commit that referenced this pull request Sep 17, 2014

Merge pull request #232 from dvirgiln/DTGOV-209
DTGOV-209 Update the ProcessesPage UI to also include deployed workflows...

@EricWittmann EricWittmann merged commit 8901a8f into Governance:master Sep 17, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment