public ActionForward execute(ActionMapping mapping, ActionForm form,
UserContainer user, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
LOGGER.finer("form bean:" + form.getClass().getName());
TypesEditorForm typeForm = (TypesEditorForm) form;
String action = typeForm.getAction();
LOGGER.finer("TypesEditorAction is " + action);
Locale locale = (Locale) request.getLocale();
MessageResources messages = servlet.getResources();
final String SUBMIT = HTMLEncoder.decode(messages.getMessage(locale,
"label.submit"));
final String ADD = HTMLEncoder.decode(messages.getMessage(locale,
"label.add"));
final String BBOX = HTMLEncoder.decode(messages.getMessage(locale,
"config.data.calculateBoundingBox.label"));
LOGGER.finer("BBOX: " + BBOX);
if (action.equals(SUBMIT)) {
return executeSubmit(mapping, typeForm, user, request);
}
if (action.equals(BBOX)) {
return executeBBox(mapping, typeForm, user, request);
}
List attributes = typeForm.getAttributes();
if (action.startsWith("up_")) {
int index = Integer.parseInt(action.substring(3));
Object attribute = attributes.remove(index);
attributes.add(index - 1, attribute);