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 $
4
* $Date: 2004/06/24 01:12:48 $
6
* Copyright 1999-2004 The Apache Software Foundation.
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
12
* http://www.apache.org/licenses/LICENSE-2.0
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.
20
package org.apache.struts.webapp.tiles.invoice;
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;
33
* Implementation of <strong>Action</strong> that populates an instance of
34
* <code>SubscriptionForm</code> from the currently specified subscription.
36
* @version $Revision: 1.7 $ $Date: 2004/06/24 01:12:48 $
39
public final class EditInvoiceAction extends Action {
42
// --------------------------------------------------------- Public Methods
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.
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
57
* @exception Exception if the application business logic throws
60
public ActionForward execute(
61
ActionMapping mapping,
63
HttpServletRequest request,
64
HttpServletResponse response)
67
// Extract attributes we will need
68
Locale locale = getLocale(request);
69
HttpSession session = request.getSession();
71
//System.out.println( "action perform called" );
72
// Fill in nested classes
73
InvoiceForm invoice = (InvoiceForm)form;
75
//RequestUtils.populate( invoice.getBillAddress(), "billAddress.", null, request );
76
//RequestUtils.populate( invoice.getShippingAddress(), "shippingAddress.", null, request );
77
return (mapping.findForward("success"));