final Class<? extends WebPage> workflowTaskViewer,
final Class<? extends WebPage> workflowInstViewer) {
super(id);
this.wm = new WorkflowMgrConn(workflowUrlStr);
this.pageNum = pageNum;
WorkflowInstancePage page = null;
System.out.println("STATUS IS "+status);
if (status.equals("ALL")) {
page = this.wm.safeGetWorkflowInstPageByStatus(pageNum);
} else {
page = this.wm.safeGetWorkflowInstPageByStatus(pageNum, status);
}
this.computeStartEndIdx(page);
add(new ListView<String>("workflow_statuses", new ListModel<String>(
wStatuses)) {
/*
* (non-Javadoc)
*
* @see
* org.apache.wicket.markup.html.list.ListView#populateItem(org.apache
* .wicket.markup.html.list.ListItem)
*/
@Override
protected void populateItem(ListItem<String> item) {
Link<String> wStatusLink = new Link<String>("wstatus_link", new Model(
item.getModelObject())) {
/*
* (non-Javadoc)
*
* @see org.apache.wicket.markup.html.link.Link#onClick()
*/
@Override
public void onClick() {
PageParameters params = new PageParameters();
params.add("status", getModelObject());
setResponsePage(getPage().getClass(), params);
}
};
Label wStatusLabel = new Label("wstatus", item.getModelObject());
if (item.getModelObject().equals(status)) {
wStatusLabel.add(new SimpleAttributeModifier("class", "selected"));
}
wStatusLink.add(wStatusLabel);
item.add(wStatusLink);
}
});
add(new Label("start_idx", String.valueOf(this.startIdx)));
add(new Label("end_idx", String.valueOf(this.endIdx)));
add(new Label("num_insts", String.valueOf(this.totalWorkflowInsts)));
add(new ListView<WorkflowInstance>("workflow_insts",
new ListModel<WorkflowInstance>(page.getPageWorkflows())) {
/*
* (non-Javadoc)
*
* @see
* org.apache.wicket.markup.html.list.ListView#populateItem(org.apache