001 // Copyright 2009 The Apache Software Foundation
002 //
003 // Licensed under the Apache License, Version 2.0 (the "License");
004 // you may not use this file except in compliance with the License.
005 // You may obtain a copy of the License at
006 //
007 // http://www.apache.org/licenses/LICENSE-2.0
008 //
009 // Unless required by applicable law or agreed to in writing, software
010 // distributed under the License is distributed on an "AS IS" BASIS,
011 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
012 // See the License for the specific language governing permissions and
013 // limitations under the License.
014
015 package org.apache.tapestry5.corelib;
016
017 /**
018 * Identifies how a {@link org.apache.tapestry5.corelib.LoopFormState} component stores state into the {@link
019 * org.apache.tapestry5.services.FormSupport} object.
020 *
021 * @since 5.1.0.4
022 */
023 public enum LoopFormState
024 {
025 /**
026 * No state of any kind is stored, as if the Loop was not contained within a {@link
027 * org.apache.tapestry5.corelib.components.Form}.
028 */
029 NONE,
030
031 /**
032 * Only enough state to iterate over the source values is stored. When the Form is submitted, the Loop will
033 * re-acquire its source and iterate over it. This is equivalent to "volatile" mode in Tapestry 5.0. This can be
034 * subject to race conditions when the values within the source change between render and submit.
035 */
036 ITERATION,
037
038 /**
039 * Stores a sequence of values (obtained via a {@link org.apache.tapestry5.ValueEncoder}) into the Form state. The
040 * source parameter is <em>not</em> re-acquired when the Form is submitted.
041 */
042 VALUES
043 }