EMPIREDB-360
Added null value check for input and control tags
diff --git a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/utils/TagEncodingHelper.java b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/utils/TagEncodingHelper.java
index 799a1c9..903f80c 100644
--- a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/utils/TagEncodingHelper.java
+++ b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/utils/TagEncodingHelper.java
@@ -786,6 +786,13 @@
ValueExpression ve = component.getValueExpression("value");
if (ve == null)
throw new PropertyReadOnlyException("value");
+
+ if (ObjectUtils.isEmpty(value))
+ { // check mandatory
+ Object mandatory = getTagAttributeValue("mandatory");
+ if (ObjectUtils.getBoolean(mandatory))
+ throw new FieldNotNullException(this.column);
+ }
FacesContext ctx = FacesContext.getCurrentInstance();
ve.setValue(ctx.getELContext(), value);