Package de.xima.fc.mdl.fdv.form
Class ParsedFieldName
- java.lang.Object
-
- de.xima.fc.mdl.fdv.form.ParsedFieldName
-
public class ParsedFieldName extends Object
For normal form elements, the name as submitted in the HTTP request is the same as the name that was configured in the Designer. For repeated elements, the name contains several pieces of information and looks liketfName_dyn_container_9
. This data class represents such a name.- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ParsedFieldName
forFieldName(String fieldName)
String
getContainerName()
If the form element is not repeated, this returns just thegetElementName()
.int
getElementIndex()
String
getElementName()
boolean
isDynamic()
-
-
-
Method Detail
-
getElementName
public String getElementName()
- Returns:
- The name of the repeated element, usually as configured in the designer, eg.
tfName
.
-
getContainerName
public String getContainerName()
If the form element is not repeated, this returns just thegetElementName()
. If the form element is itself repeat, this returns thegetElementName()
as well. If the form element is inside a repeated container, this returns the name of that container.- Returns:
- The name of the repeated parent element.
-
getElementIndex
public int getElementIndex()
- Returns:
- The index of the repetition, starting at
0
.
-
isDynamic
public boolean isDynamic()
- Returns:
true
if this element is dynamic or is inside a repeated container,false
otherwise.
-
forFieldName
public static ParsedFieldName forFieldName(String fieldName)
- Parameters:
fieldName
- A submitted field name to parse.- Returns:
- The parsed field name, see
ParsedFieldName
for details.
-
-