MessageResources messages = servlet.getResources();
String edit = messages.getMessage(locale, "label.edit");
String delete = messages.getMessage(locale, "label.delete");
ServletContext context = this.getServlet().getServletContext();
ValidationConfig validationConfig = (ValidationConfig) context.getAttribute(ValidationConfig.CONFIG_KEY);
if (edit.equals(buttonAction)) {
TestSuiteConfig suiteConfig = (TestSuiteConfig) validationConfig.getTestSuites().get(selectedTestSuite);
request.getSession().setAttribute(TestSuiteConfig.CURRENTLY_SELECTED_KEY, suiteConfig);
return mapping.findForward("validationTest");
} else if (delete.equals(buttonAction)) {
Map suites = validationConfig.getTestSuites();
suites.remove(selectedTestSuite);
validationConfig.setTestSuites(suites);
getApplicationState().notifyConfigChanged();
request.getSession().removeAttribute(TestSuiteConfig.CURRENTLY_SELECTED_KEY);
return mapping.findForward("suite");