connForm.setName(config.getName());
connForm.setType(config.getType());
Map paramValues = config.getParamValues();
String connId = (String) paramValues.get(ConnectorForm.CONNECTOR_ID);
ConnectorConfigData cfgData =
ConnectorConfigRegistry.getConnectorConfigData(connId);
String[] attrNames = cfgData.getFieldNames();
for(int i = 0; i < attrNames.length; i++) {
String value = (String) paramValues.get(attrNames[i]);
if (value != null) {
connForm.setConfigName(i, attrNames[i]);
connForm.setConfigValue(i, value);
}
}
connForm.setConnectorId(connId);
connForm.setConnectorName(cfgData.getConnectorName());
/*set current page for navigation*/
request.setAttribute(RequestAttributes.NAV_CURRENT_PAGE, "Edit Application");
return mapping.findForward(Forwards.SUCCESS);
}