* @param id
*/
public WorkflowTaskViewer(String id, String wmUrlStr, String taskId, final Class<? extends WebPage> conditionPage) {
super(id);
this.wm = new WorkflowMgrConn(wmUrlStr);
final WorkflowTask task = this.wm.safeGetTaskById(taskId);
add(new Label("workflow_task_id", task.getTaskId()));
add(new Label("workflow_task_name", task.getTaskName()));
add(new Label("workflow_task_class", task.getTaskInstanceClassName()));
List<String> taskConfigMetKeyNames = Arrays.asList(task.getTaskConfig()
.getProperties().keySet().toArray(
new String[task.getTaskConfig().getProperties().size()]));
Collections.sort(taskConfigMetKeyNames);
add(new ListView<String>("workflow_config", new ListModel<String>(taskConfigMetKeyNames)){
@Override
protected void populateItem(ListItem<String> item) {
String configMetKeyName = item.getModelObject();
String configMetKeyValue = task.getTaskConfig().getProperty(configMetKeyName);
item.add(new Label("workflow_config_pname", configMetKeyName));
item.add(new Label("workflow_config_pvalue", configMetKeyValue));
}
});
add(new ListView<WorkflowCondition>("workflow_conditions", new ListModel<WorkflowCondition>(task.getConditions())){
/* (non-Javadoc)
* @see org.apache.wicket.markup.html.list.ListView#populateItem(org.apache.wicket.markup.html.list.ListItem)
*/
@Override
protected void populateItem(ListItem<WorkflowCondition> item) {