1 25 26 package org.objectweb.jonas.webapp.jonasadmin.deploy; 27 28 import java.util.ArrayList ; 29 import java.util.Arrays ; 30 31 import javax.servlet.ServletException ; 32 import javax.servlet.http.HttpServletRequest ; 33 import javax.servlet.http.HttpServletResponse ; 34 35 import org.apache.struts.action.ActionForm; 36 import org.apache.struts.action.ActionForward; 37 import org.apache.struts.action.ActionMapping; 38 import org.apache.struts.action.ActionMessage; 39 40 44 public class ApplyRemoveAction extends BaseDeployAction { 45 46 55 public ActionForward executeAction(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest request, 56 HttpServletResponse response) throws ServletException { 57 58 String sForward = "Remove Confirm"; 59 60 RemoveForm removeForm = (RemoveForm) actionForm; 62 try { 63 64 removeForm.setListToBeRemoved(Arrays.asList(removeForm.getRemoveSelected())); 65 removeForm.setListRemoved(new ArrayList ()); 66 removeForm.setConfirm(removeForm.getRemoveSelected().length > 0); 67 if (!removeForm.isConfirm()) { 68 m_Errors.add("error.remove.noselect", new ActionMessage("error.remove.noselect")); 69 saveErrors(request, m_Errors); 70 sForward = "Remove"; 71 } 72 73 } catch (Throwable t) { 74 addGlobalError(t); 75 saveErrors(request, m_Errors); 76 return (actionMapping.findForward("Global Error")); 77 } 78 return (actionMapping.findForward(sForward)); 80 } 81 } 82 | Popular Tags |