@ApplicationScoped public class FormProcessorImpl extends Object implements FormProcessor, Serializable
ATTR_INTERPRETER, CUSTOM_NAMESPACE_SEPARATOR, DEFAULT_NAMESPACE, FORM_MODE, MODIFIED_FIELD_NAMES, NAMESPACE_SEPARATOR
Constructor and Description |
---|
FormProcessorImpl() |
Modifier and Type | Method and Description |
---|---|
void |
clear(FormRenderContext context) |
void |
clear(Form form,
String namespace) |
void |
clear(String ctxUID) |
void |
clearField(Form form,
String namespace,
String fieldName) |
void |
clearFieldErrors(Form form,
String namespace) |
protected FormStatus |
createContextFormStatus(FormRenderContext context) |
protected FormStatus |
createFormStatus(Form form,
String namespace,
Map currentValues,
Map<String,Object> loadedObjects) |
protected void |
destroyFormStatus(Form form,
String namespace) |
protected boolean |
existsFormStatus(Form form,
String namespace) |
protected void |
fillObjectValues(Map obj,
Map values,
Form form)
Copy to obj values read from status map values
|
Map |
filterMapRepresentationToPersist(Map inputValues) |
void |
forceWrongField(Form form,
String namespace,
String fieldName) |
Object |
getAttribute(Form form,
String namespace,
String attributeName) |
protected Object |
getBindedValue(Field field,
DataHolder holder,
String bindingExpression,
Map<String,Object> bindingData,
Map loadedObjects,
String namespace) |
protected FormStatus |
getContextFormStatus(FormRenderContext context) |
protected Map |
getFilteredMapRepresentationToPersist(Form form,
String namespace) |
protected FormStatus |
getFormStatus(Form form,
String namespace) |
protected FormStatus |
getFormStatus(Form form,
String namespace,
Map<String,Object> currentValues,
Map<String,Object> loadedObjects) |
Map |
getMapRepresentationToPersist(Form form,
String namespace) |
protected String |
getPrefix(Form form,
String namespace) |
protected Object |
getUnbindedFieldValue(String bindingExpression,
Map<String,Object> bindingData) |
void |
modify(Form form,
String namespace,
String fieldName,
Object value) |
void |
persist(FormRenderContext context) |
void |
persist(String ctxUid) |
protected Object |
persistField(Field field,
Map<String,Object> mapToPersist,
DataHolder holder,
String namespace) |
Object |
persistFormHolder(Form form,
String namespace,
Map<String,Object> mapToPersist,
DataHolder holder,
Object loadedObject) |
protected void |
propagateChangesToParentFormStatuses(FormStatus formStatus,
String fieldName,
Object value) |
FormStatusData |
read(Form form,
String namespace) |
FormStatusData |
read(Form form,
String namespace,
Map formValues) |
FormStatusData |
read(Form form,
String namespace,
Map<String,Object> formValues,
Map<String,Object> loadedObjects) |
FormStatusData |
read(String ctxUid) |
Map |
readValuesToLoad(Form form,
Map inputData,
Map outputData,
Map loadedObjects,
String namespace) |
void |
setAttribute(Form form,
String namespace,
String attributeName,
Object attributeValue) |
protected void |
setDefaultValues(Form form,
String namespace,
Map currentValues) |
protected void |
setFieldValue(Field field,
FormStatus formStatus,
String inputsPrefix,
Map parameterMap,
Map filesMap,
boolean incremental) |
void |
setFieldValue(Field field,
String namespace,
Map parametersMap,
Map filesMap,
boolean incremental) |
void |
setValues(Form form,
String namespace,
Map parameterMap,
Map filesMap) |
void |
setValues(Form form,
String namespace,
Map parameterMap,
Map filesMap,
boolean incremental) |
protected FormStatus getContextFormStatus(FormRenderContext context)
protected FormStatus getFormStatus(Form form, String namespace)
protected FormStatus getFormStatus(Form form, String namespace, Map<String,Object> currentValues, Map<String,Object> loadedObjects)
protected FormStatus createFormStatus(Form form, String namespace, Map currentValues, Map<String,Object> loadedObjects)
public void setValues(Form form, String namespace, Map parameterMap, Map filesMap)
setValues
in interface FormProcessor
public void setValues(Form form, String namespace, Map parameterMap, Map filesMap, boolean incremental)
setValues
in interface FormProcessor
public void modify(Form form, String namespace, String fieldName, Object value)
modify
in interface FormProcessor
public void setAttribute(Form form, String namespace, String attributeName, Object attributeValue)
setAttribute
in interface FormProcessor
public Object getAttribute(Form form, String namespace, String attributeName)
getAttribute
in interface FormProcessor
public void setFieldValue(Field field, String namespace, Map parametersMap, Map filesMap, boolean incremental)
setFieldValue
in interface FormProcessor
protected void setFieldValue(Field field, FormStatus formStatus, String inputsPrefix, Map parameterMap, Map filesMap, boolean incremental)
protected void propagateChangesToParentFormStatuses(FormStatus formStatus, String fieldName, Object value)
public FormStatusData read(String ctxUid)
read
in interface FormProcessor
protected FormStatus createContextFormStatus(FormRenderContext context) throws Exception
Exception
public Map readValuesToLoad(Form form, Map inputData, Map outputData, Map loadedObjects, String namespace)
readValuesToLoad
in interface FormProcessor
protected Object getUnbindedFieldValue(String bindingExpression, Map<String,Object> bindingData)
protected Object getBindedValue(Field field, DataHolder holder, String bindingExpression, Map<String,Object> bindingData, Map loadedObjects, String namespace)
public FormStatusData read(Form form, String namespace, Map formValues)
read
in interface FormProcessor
public FormStatusData read(Form form, String namespace, Map<String,Object> formValues, Map<String,Object> loadedObjects)
read
in interface FormProcessor
public FormStatusData read(Form form, String namespace)
read
in interface FormProcessor
public void persist(String ctxUid) throws Exception
persist
in interface FormProcessor
Exception
public void persist(FormRenderContext context) throws Exception
persist
in interface FormProcessor
Exception
public Object persistFormHolder(Form form, String namespace, Map<String,Object> mapToPersist, DataHolder holder, Object loadedObject) throws Exception
persistFormHolder
in interface FormProcessor
Exception
protected Object persistField(Field field, Map<String,Object> mapToPersist, DataHolder holder, String namespace) throws Exception
Exception
public Map getMapRepresentationToPersist(Form form, String namespace) throws Exception
getMapRepresentationToPersist
in interface FormProcessor
Exception
protected Map getFilteredMapRepresentationToPersist(Form form, String namespace) throws Exception
Exception
public Map filterMapRepresentationToPersist(Map inputValues) throws Exception
Exception
protected void fillObjectValues(Map obj, Map values, Form form) throws Exception
obj
- values
- Exception
public void clear(FormRenderContext context)
clear
in interface FormProcessor
public void clear(String ctxUID)
clear
in interface FormProcessor
public void clear(Form form, String namespace)
clear
in interface FormProcessor
public void clearField(Form form, String namespace, String fieldName)
clearField
in interface FormProcessor
public void clearFieldErrors(Form form, String namespace)
clearFieldErrors
in interface FormProcessor
public void forceWrongField(Form form, String namespace, String fieldName)
forceWrongField
in interface FormProcessor
Copyright © 2001–2016 JBoss by Red Hat. All rights reserved.