1 /* 2 * $Id$ 3 * 4 * Licensed to the Apache Software Foundation (ASF) under one 5 * or more contributor license agreements. See the NOTICE file 6 * distributed with this work for additional information 7 * regarding copyright ownership. The ASF licenses this file 8 * to you under the Apache License, Version 2.0 (the 9 * "License"); you may not use this file except in compliance 10 * with the License. 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, 15 * software distributed under the License is distributed on an 16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 * KIND, either express or implied. See the License for the 18 * specific language governing permissions and limitations 19 * under the License. 20 */ 21 package org.apache.struts.config; 22 23 import jakarta.servlet.RequestDispatcher; 24 25 /** 26 * Constants relating to the reset and population events of action forms. 27 * 28 * @since Struts 1.4 29 */ 30 public abstract class PopulateEvent { 31 32 /** 33 * Specifies that population must always occur. This type may not be 34 * combined with any other type. 35 */ 36 public static final String ALL = "all"; 37 38 /** 39 * Specifies that population occurs when the form is cancelled. 40 */ 41 public static final String CANCEL = "cancel"; 42 43 /** 44 * Specifies that population occurs when the current executing action has 45 * been forwarded by another action. It should be noted that if the chained 46 * action mapping refers to the same form bean as originating action, then 47 * the form bean is repopulated and changes made by originating action are 48 * lost. 49 */ 50 public static final String CHAIN = "chain"; 51 52 /** 53 * Specifies that population occurs when the current requested is part of a 54 * forwarded request. Unlike {@link #CHAIN} which is limited to 55 * action-to-action behavior, the forward can be from any servlet resource. 56 * 57 * @see RequestDispatcher#forward(jakarta.servlet.ServletRequest, 58 * jakarta.servlet.ServletResponse) 59 */ 60 public static final String FORWARD = "forward"; 61 62 /** 63 * Specifies that population occurs when the current requested is part of 64 * any included request. 65 * 66 * @see RequestDispatcher#include(jakarta.servlet.ServletRequest, 67 * jakarta.servlet.ServletResponse) 68 */ 69 public static final String INCLUDE = "include"; 70 71 /** 72 * Specifies that population must never occur. This type may not be combined 73 * with any other type. 74 */ 75 public static final String NONE = "none"; 76 77 /** 78 * Specifies that population occurs for an ordinary client request. 79 */ 80 public static final String REQUEST = "request"; 81 }