1 /* 2 * Copyright 2003,2004 The Apache Software Foundation. 3 * 4 * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0 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 17 package org.apache.struts.chain.servlet; 18 19 20 import org.apache.commons.chain.Context; 21 import org.apache.struts.action.ActionForward; 22 import org.apache.struts.chain.AbstractSelectInput; 23 import org.apache.struts.config.ForwardConfig; 24 import org.apache.struts.config.ModuleConfig; 25 26 27 /** 28 * <p>Validate the properties of the form bean for this request. If there are 29 * any validation errors, execute the child commands in our chain; otherwise, 30 * proceed normally.</p> 31 * 32 * @version $Rev: 54933 $ $Date: 2004-10-16 18:04:52 +0100 (Sat, 16 Oct 2004) $ 33 */ 34 35 public class SelectInput extends AbstractSelectInput { 36 37 38 // ------------------------------------------------------- Protected Methods 39 40 41 /** 42 * <p>Create and return a <code>ForwardConfig</code> representing the 43 * specified module-relative destination.</p> 44 * 45 * @param context The context for this request 46 * @param moduleConfig The <code>ModuleConfig</code> for this request 47 * @param uri The module-relative URI to be the destination 48 */ 49 protected ForwardConfig forward(Context context, 50 ModuleConfig moduleConfig, 51 String uri) { 52 53 return (new ActionForward(null, moduleConfig.getPrefix() + uri, 54 false, true)); 55 56 } 57 58 59 }