this.wm = new WorkflowMgrConn(wmUrlStr);
final WorkflowCondition cond = this.wm.safeGetConditionById(conditionId);
add(new Label("condition_id", cond.getConditionId()));
add(new Label("condition_name", cond.getConditionName()));
add(new Label("condition_class", cond.getConditionInstanceClassName()));
final WorkflowConditionConfiguration config = cond.getCondConfig() != null ?
cond.getCondConfig():new WorkflowConditionConfiguration();
List<String> condConfigKeyNames = Arrays.asList(config
.getProperties().keySet().toArray(
new String[config.getProperties().size()]));
Collections.sort(condConfigKeyNames);
add(new ListView<String>("cond_config", new ListModel<String>(
condConfigKeyNames)) {
/*
* (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) {
String keyName = item.getModelObject();
String keyVal = config.getProperty(keyName);
item.add(new Label("cond_pname", keyName));
item.add(new Label("cond_pvalue", keyVal));
}
});