public final class FieldUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
FieldUtil.ResolvedFieldLink
A resolved field-link.
|
Modifier and Type | Method and Description |
---|---|
static void |
copyValue(IntelligentField fromField,
IntelligentField toField)
Copies the value from one field to another.
|
static String |
generateId(com.saperion.ngc.iform.xml.EditFieldType field)
Generates a unique id for an
EditFieldType . |
static Object |
getFieldValue(IntelligentField fromField)
Returns the value from the specified field as object.
|
static String |
getFormatPatternForDecimalFields(com.saperion.ngc.iform.xml.EditFieldType field)
Returns a pattern-string that can be used to format a ZK NumberInputElement.
|
static DecimalFormat |
getFormatterForDecimalFields(com.saperion.ngc.iform.xml.EditFieldType field)
Creates a new
DecimalFormat instance for use in the specified field. |
static com.saperion.jni.SaJNIValue |
getJniValueFromLookupField(LookupTextField field)
Create a SaJNIValue from the value that is entered in the specified lookup-field.
|
static com.saperion.jni.SaJNIValue[] |
getJniValuesFromLookupField(LookupTextField field)
Create a SaJNIValue from the value that is entered in the specified lookup-field.
|
static Object |
getLookupValue(LookupTextField field,
String column)
Gets the value of the specified column of the specified lookup-field..
|
static IntelligentFormView |
getParentForm(org.zkoss.zk.ui.Component formComponent)
Returns the parent form of the specified component or null, if the component is not part
of a form.
|
static boolean |
isBooleanField(IntelligentField field) |
static boolean |
isDateField(IntelligentField field) |
static boolean |
isDoubleField(IntelligentField field) |
static boolean |
isIntegerField(IntelligentField field) |
static boolean |
isMultivalueField(IntelligentField field) |
static boolean |
isStringField(IntelligentField field) |
static FieldUtil.ResolvedFieldLink |
resolveFieldLink(String link,
IntelligentFormView form)
Resolves a field link.
|
public static void copyValue(IntelligentField fromField, IntelligentField toField)
fromField
- source-fieldtoField
- target-fieldpublic static Object getFieldValue(IntelligentField fromField)
fromField
- source-fieldpublic static com.saperion.jni.SaJNIValue getJniValueFromLookupField(LookupTextField field)
field
- the fieldpublic static com.saperion.jni.SaJNIValue[] getJniValuesFromLookupField(LookupTextField field)
field
- the fieldpublic static Object getLookupValue(LookupTextField field, String column)
field
- the fieldcolumn
- the columnpublic static FieldUtil.ResolvedFieldLink resolveFieldLink(String link, IntelligentFormView form)
link
- the link as Stringform
- the form parent form of the field that contains the linkpublic static String generateId(com.saperion.ngc.iform.xml.EditFieldType field)
EditFieldType
.field
- the field to generate an id forpublic static IntelligentFormView getParentForm(org.zkoss.zk.ui.Component formComponent)
formComponent
- component to get the parent form forpublic static DecimalFormat getFormatterForDecimalFields(com.saperion.ngc.iform.xml.EditFieldType field)
DecimalFormat
instance for use in the specified field.
The formatter will be localized for the current locale and will contain the currency-
symbol for the specified field (if the field is a currency-field).field
- field to create the formatterforDecimalFormat
public static String getFormatPatternForDecimalFields(com.saperion.ngc.iform.xml.EditFieldType field)
DecimalFormat
but uses the actual currency-symbol instead of the
currency-symbol-placeholder ยค (see DecimalFormat
).field
- field to create the pattern forpublic static boolean isDateField(IntelligentField field)
field
- field to checkDate
.public static boolean isStringField(IntelligentField field)
field
- field to checkString
.public static boolean isIntegerField(IntelligentField field)
field
- field to checkInteger
.public static boolean isBooleanField(IntelligentField field)
field
- field to checkBoolean
.public static boolean isDoubleField(IntelligentField field)
field
- field to checkDouble
.public static boolean isMultivalueField(IntelligentField field)
field
- field to checkCopyright © 2020 Hyland Software Germany GmbH. All rights reserved.