public class DataDataStoresSelectAction extends ConfigAction {
public ActionForward execute(ActionMapping mapping,
ActionForm incomingForm, UserContainer user, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
DataDataStoresSelectForm form = (DataDataStoresSelectForm) incomingForm;
String buttonAction = form.getButtonAction();
DataConfig dataConfig = (DataConfig) getDataConfig();
DataStoreConfig dsConfig = null;
Locale locale = (Locale) request.getLocale();
MessageResources messages = servlet.getResources();
String editLabel = messages.getMessage(locale, "label.edit");
String deleteLabel = messages.getMessage(locale, "label.delete");
if (editLabel.equals(buttonAction)) {
dsConfig = (DataStoreConfig) dataConfig.getDataStore(form
.getSelectedDataStoreId());
getUserContainer(request).setDataStoreConfig(dsConfig);
return mapping.findForward("config.data.store.editor");
} else if (deleteLabel.equals(buttonAction)) {
dataConfig.removeDataStore(form.getSelectedDataStoreId());
getUserContainer(request).setDataStoreConfig(null);
form.reset(mapping, request);
return mapping.findForward("config.data.store");
}
throw new ServletException(