01: package org.objectweb.jonas.webapp.jonasadmin.jonasmqconnect;
02:
03: import java.io.IOException;
04: import java.util.ArrayList;
05:
06: import javax.servlet.ServletException;
07: import javax.servlet.http.HttpServletRequest;
08: import javax.servlet.http.HttpServletResponse;
09:
10: import org.apache.struts.action.ActionForm;
11: import org.apache.struts.action.ActionForward;
12: import org.apache.struts.action.ActionMapping;
13: import org.objectweb.jonas.webapp.jonasadmin.JonasBaseAction;
14:
15: public class DestinationDeleteAction extends JonasBaseAction {
16:
17: public ActionForward executeAction(ActionMapping mapping,
18: ActionForm form, HttpServletRequest request,
19: HttpServletResponse response) throws IOException,
20: ServletException {
21:
22: DestinationDeleteForm fBean = (DestinationDeleteForm) form;
23: String[] selectedDestinations = fBean.getSelectedDestinations();
24: ArrayList destinations = new ArrayList();
25: String destinationsStr = "";
26: if (selectedDestinations != null) {
27: for (int i = 0; i < selectedDestinations.length; i++) {
28: destinations.add(selectedDestinations[i]);
29: destinationsStr += selectedDestinations[i] + ";";
30: }
31: }
32: fBean.setDestinations(destinations);
33: fBean.setDestinationsStr(destinationsStr);
34:
35: return mapping.findForward("JonasMqConnectDestinationDelete");
36: }
37: }
|