HttpServletResponse response)
throws Exception{
AccessController.checkAccess(context.getServiceContext(),
ACL_EDIT_APPLICATIONS);
ApplicationConfig config = context.getApplicationConfig();
ApplicationForm appForm = (ApplicationForm)actionForm;
ApplicationType appType = config.getApplicationType();
MetaApplicationConfig metaAppConfig =
appType.getModule().getMetaApplicationConfig();
/* populate the form */
appForm.setApplicationId(config.getApplicationId());
appForm.setName(config.getName());
appForm.setType(config.getType());
if(metaAppConfig.isDisplayHost())
appForm.setHost(config.getHost());
if(metaAppConfig.isDisplayPort())
appForm.setPort(String.valueOf(config.getPort()));
if(metaAppConfig.isDisplayURL())
appForm.setURL(config.getURL());
if(metaAppConfig.isDisplayUsername())
appForm.setUsername(config.getUsername());
if(metaAppConfig.isDisplayPassword() && config.getPassword() != null
&& config.getPassword().length()>0)
appForm.setPassword(ApplicationForm.FORM_PASSWORD);
// for jsr160
Map paramValues = config.getParamValues();
appForm.setJndiFactory((String)paramValues.get(ApplicationConfig.JNDI_FACTORY));
appForm.setJndiURL((String)paramValues.get(ApplicationConfig.JNDI_URL));
request.setAttribute(RequestAttributes.META_APP_CONFIG, metaAppConfig);
/*set current page for navigation*/
request.setAttribute(RequestAttributes.NAV_CURRENT_PAGE, "Edit Application");