1 5 6 package com.raptus.owxv3.api.components; 7 8 import javax.servlet.http.HttpServletRequest ; 9 10 import org.apache.struts.action.*; 11 12 import com.raptus.owxv3.modules.base.BaseConstants; 13 14 36 public class CmpPicsAction extends ComponentAction 37 { 38 41 public void dispatchComponent(HttpServletRequest request, ComponentBean cbean) 42 { 43 String unlinkPicID = request.getParameter(ComponentConstants.HTTPGET_PARAM_UNLINKPICID); 44 if(unlinkPicID != null) 45 { 46 int ulpID = convertToInteger(-1, unlinkPicID); 47 if(ulpID != -1) 48 { 49 ((CmpPicsBean) cbean).getPicsSelector().unlinkPicture(ulpID); 50 } 52 } 53 else 54 { 55 boolean success=((CmpPicsBean) cbean).populateViewFields(); 56 if(! success) 57 { 58 59 ActionErrors errors=new ActionErrors(); 60 errors.add(ActionErrors.GLOBAL_ERROR,new ActionError(BaseConstants.COMPONENT_PICS_ERROR_PICTURELIMIT)); 61 saveErrors(request,errors); 62 } 63 } } 65 66 } 67 68 | Popular Tags |