001/** 002 * Copyright 2005-2016 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.rice.kns.web.struts.form; 017 018import javax.servlet.http.HttpServletRequest; 019 020import org.apache.commons.lang.StringUtils; 021import org.apache.struts.action.ActionMapping; 022import org.kuali.rice.krad.util.KRADConstants; 023 024/** 025 * Feedback form which is used to collect feedback from a user and 026 * then email it to a feedback mailing list 027 * 028 * @deprecated KNS Struts deprecated, use KRAD and the Spring MVC framework. 029 */ 030@Deprecated 031public class KualiFeedbackHandlerForm extends KualiForm { 032 033 private static final long serialVersionUID = -7641833777580490471L; 034 035 private boolean cancel = false; 036 private String description; 037 private String documentId = ""; 038 private String componentName; 039 040 /** 041 * @see org.kuali.rice.kns.web.struts.pojo.PojoForm#populate(javax.servlet.http.HttpServletRequest) 042 */ 043 @Override 044 public void populate(HttpServletRequest request) { 045 super.populate(request); 046 // ie explorer needs this. 047 if(StringUtils.isNotBlank(request.getParameter(KRADConstants.CANCEL_METHOD + ".x")) && 048 StringUtils.isNotBlank(request.getParameter(KRADConstants.CANCEL_METHOD + ".y"))){ 049 this.setCancel(true); 050 } 051 } 052 053 public void reset(ActionMapping mapping, HttpServletRequest request) { 054 055 this.setMethodToCall(null); 056 this.setRefreshCaller(null); 057 this.setAnchor(null); 058 this.setCurrentTabIndex(0); 059 060 this.cancel = false; 061 this.documentId = null; 062 this.description = null; 063 this.componentName = null; 064 } 065 066 public boolean isCancel() { 067 return cancel; 068 } 069 070 public void setCancel(boolean cancel) { 071 this.cancel = cancel; 072 } 073 074 public String getDescription() { 075 return description; 076 } 077 078 public void setDescription(String description) { 079 this.description = description; 080 } 081 082 public String getDocumentId() { 083 return documentId; 084 } 085 086 public void setDocumentId(String documentId) { 087 this.documentId = documentId; 088 } 089 090 public String getComponentName() { 091 return componentName; 092 } 093 094 public void setComponentName(String componentName) { 095 this.componentName = componentName; 096 } 097}