@SuppressWarnings("deprecation")
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws Exception {
DefinitionForm defForm = (DefinitionForm) form;
Map<String, Integer> params = new HashMap<String, Integer>();
FormContext context = defForm.getContext();
params.put("ad", defForm.getAd());
if (context == FormContext.Type) {
params.put(ParamConstants.RESOURCE_TYPE_ID_PARAM, defForm.getType());
} else if (context == FormContext.Resource) {