~ubuntu-branches/ubuntu/trusty/libstruts1.2-java/trusty-proposed

« back to all changes in this revision

Viewing changes to src/tiles-documentation/org/apache/struts/webapp/tiles/invoice/EditInvoiceAction.java

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Vandyck
  • Date: 2004-11-19 15:35:25 UTC
  • Revision ID: james.westby@ubuntu.com-20041119153525-mdu08a76z4zo67xt
Tags: upstream-1.2.4
ImportĀ upstreamĀ versionĀ 1.2.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * $Header: /home/cvs/jakarta-struts/src/tiles-documentation/org/apache/struts/webapp/tiles/invoice/EditInvoiceAction.java,v 1.7 2004/06/24 01:12:48 jmitchell Exp $
 
3
 * $Revision: 1.7 $
 
4
 * $Date: 2004/06/24 01:12:48 $
 
5
 *
 
6
 * Copyright 1999-2004 The Apache Software Foundation.
 
7
 * 
 
8
 * Licensed under the Apache License, Version 2.0 (the "License");
 
9
 * you may not use this file except in compliance with the License.
 
10
 * You may obtain a copy of the License at
 
11
 * 
 
12
 *      http://www.apache.org/licenses/LICENSE-2.0
 
13
 * 
 
14
 * Unless required by applicable law or agreed to in writing, software
 
15
 * distributed under the License is distributed on an "AS IS" BASIS,
 
16
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
17
 * See the License for the specific language governing permissions and
 
18
 * limitations under the License.
 
19
 */
 
20
package org.apache.struts.webapp.tiles.invoice;
 
21
 
 
22
import java.util.Locale;
 
23
import javax.servlet.http.HttpServletRequest;
 
24
import javax.servlet.http.HttpServletResponse;
 
25
import javax.servlet.http.HttpSession;
 
26
import org.apache.struts.action.Action;
 
27
import org.apache.struts.action.ActionForm;
 
28
import org.apache.struts.action.ActionForward;
 
29
import org.apache.struts.action.ActionMapping;
 
30
 
 
31
 
 
32
/**
 
33
 * Implementation of <strong>Action</strong> that populates an instance of
 
34
 * <code>SubscriptionForm</code> from the currently specified subscription.
 
35
 *
 
36
 * @version $Revision: 1.7 $ $Date: 2004/06/24 01:12:48 $
 
37
 */
 
38
 
 
39
public final class EditInvoiceAction extends Action {
 
40
 
 
41
 
 
42
    // --------------------------------------------------------- Public Methods
 
43
 
 
44
 
 
45
    /**
 
46
     * Process the specified HTTP request, and create the corresponding HTTP
 
47
     * response (or forward to another web component that will create it).
 
48
     * Return an <code>ActionForward</code> instance describing where and how
 
49
     * control should be forwarded, or <code>null</code> if the response has
 
50
     * already been completed.
 
51
     *
 
52
     * @param mapping The ActionMapping used to select this instance
 
53
     * @param actionForm The optional ActionForm bean for this request (if any)
 
54
     * @param request The HTTP request we are processing
 
55
     * @param response The HTTP response we are creating
 
56
     *
 
57
     * @exception Exception if the application business logic throws
 
58
     *  an exception
 
59
     */
 
60
    public ActionForward execute(
 
61
                                 ActionMapping mapping,
 
62
                                 ActionForm form,
 
63
                                 HttpServletRequest request,
 
64
                                 HttpServletResponse response)
 
65
        throws Exception {
 
66
 
 
67
        // Extract attributes we will need
 
68
        Locale locale = getLocale(request);
 
69
        HttpSession session = request.getSession();
 
70
 
 
71
    //System.out.println( "action perform called" );
 
72
      // Fill in nested classes
 
73
    InvoiceForm invoice = (InvoiceForm)form;
 
74
 
 
75
    //RequestUtils.populate(  invoice.getBillAddress(), "billAddress.", null, request );
 
76
    //RequestUtils.populate(  invoice.getShippingAddress(), "shippingAddress.", null, request );
 
77
          return (mapping.findForward("success"));
 
78
 
 
79
    }
 
80
 
 
81
 
 
82
}