View Javadoc
1   /*
2    * Copyright 2011 The Kuali Foundation.
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.ole.select.document.web;
17  
18  import org.apache.struts.action.ActionForm;
19  import org.apache.struts.action.ActionForward;
20  import org.apache.struts.action.ActionMapping;
21  import org.kuali.ole.select.document.OleDefaultTableColumnValueDocument;
22  import org.kuali.rice.core.api.util.RiceConstants;
23  import org.kuali.rice.core.api.util.RiceKeyConstants;
24  import org.kuali.rice.kns.util.KNSGlobalVariables;
25  import org.kuali.rice.kns.web.struts.action.KualiTransactionalDocumentActionBase;
26  
27  import javax.servlet.http.HttpServletRequest;
28  import javax.servlet.http.HttpServletResponse;
29  
30  public class OleDefaultTableColumnValueAction extends KualiTransactionalDocumentActionBase {
31  
32      private static final org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(OleDefaultTableColumnValueAction.class);
33  
34      public OleDefaultTableColumnValueAction() {
35          super();
36      }
37  
38      @Override
39      public ActionForward execute(ActionMapping mapping, ActionForm form,
40                                   HttpServletRequest request, HttpServletResponse response) throws Exception {
41          return super.execute(mapping, form, request, response);
42  
43      }
44  
45      public ActionForward start(ActionMapping mapping, ActionForm form,
46                                 HttpServletRequest request, HttpServletResponse response) throws Exception {
47          return super.docHandler(mapping, form, request, response);
48      }
49  
50      @Override
51      public ActionForward docHandler(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
52          ActionForward actionForward = super.docHandler(mapping, form, request, response);
53          return actionForward;
54  
55      }
56  
57      public ActionForward valueSubmit(ActionMapping mapping, ActionForm form,
58                                       HttpServletRequest request, HttpServletResponse response) throws Exception {
59  
60          OleDefaultTableColumnValueForm oleDefaultTableColumnValueForm = (OleDefaultTableColumnValueForm) form;
61          OleDefaultTableColumnValueDocument oleDefaultTableColumnValueDocument = (OleDefaultTableColumnValueDocument) oleDefaultTableColumnValueForm.getDocument();
62          oleDefaultTableColumnValueDocument.valueSubmit();
63          KNSGlobalVariables.getMessageList().add(RiceKeyConstants.MESSAGE_ROUTE_SUCCESSFUL);
64          return mapping.findForward(RiceConstants.MAPPING_BASIC);
65      }
66  
67  }