| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| LoopFormState |
|
| 0.0;0 |
| 1 | // Copyright 2009 The Apache Software Foundation | |
| 2 | // | |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); | |
| 4 | // you may not use this file except in compliance with the License. | |
| 5 | // You may obtain a copy of the License at | |
| 6 | // | |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 | |
| 8 | // | |
| 9 | // Unless required by applicable law or agreed to in writing, software | |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, | |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 12 | // See the License for the specific language governing permissions and | |
| 13 | // limitations under the License. | |
| 14 | ||
| 15 | package org.apache.tapestry5.corelib; | |
| 16 | ||
| 17 | /** | |
| 18 | * Identifies how a {@link org.apache.tapestry5.corelib.LoopFormState} component stores state into the {@link | |
| 19 | * org.apache.tapestry5.services.FormSupport} object. | |
| 20 | * | |
| 21 | * @since 5.1.0.4 | |
| 22 | */ | |
| 23 | 10 | public enum LoopFormState |
| 24 | { | |
| 25 | /** | |
| 26 | * No state of any kind is stored, as if the Loop was not contained within a {@link | |
| 27 | * org.apache.tapestry5.corelib.components.Form}. | |
| 28 | */ | |
| 29 | 2 | NONE, |
| 30 | ||
| 31 | /** | |
| 32 | * Only enough state to iterate over the source values is stored. When the Form is submitted, the Loop will | |
| 33 | * re-acquire its source and iterate over it. This is equivalent to "volatile" mode in Tapestry 5.0. This can be | |
| 34 | * subject to race conditions when the values within the source change between render and submit. | |
| 35 | */ | |
| 36 | 2 | ITERATION, |
| 37 | ||
| 38 | /** | |
| 39 | * Stores a sequence of values (obtained via a {@link org.apache.tapestry5.ValueEncoder}) into the Form state. The | |
| 40 | * source parameter is <em>not</em> re-acquired when the Form is submitted. | |
| 41 | */ | |
| 42 | 2 | VALUES |
| 43 | } |