This is an automated email from the ASF dual-hosted git repository.
derjan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/empire-db.git
The following commit(s) were added to refs/heads/master by this push:
new 6b7b6ed2 EMPIREDB-437
6b7b6ed2 is described below
commit 6b7b6ed22957e640ccf3d9ec19acb5120d3e0b76
Author: Jan Glaubitz <[email protected]>
AuthorDate: Wed Oct 30 11:51:34 2024 +0100
EMPIREDB-437
- fix clearLocalValues for AJAX requests
---
.../org/apache/empire/jsf2/controls/InputControl.java | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/InputControl.java
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/InputControl.java
index 2e6b43f9..9ea286bb 100644
---
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/InputControl.java
+++
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/InputControl.java
@@ -524,13 +524,19 @@ public abstract class InputControl
{
// UIInput
if (comp instanceof UIInput)
- {
+ { // Check LocalValue set
UIInput input = (UIInput)comp;
- if (input.isLocalValueSet())
- { input.setValue(null);
- input.setLocalValueSet(false);
- // log.debug("clearLocalValues performed for {}",
input.getClass().getName());
+ if (input.isValid() && input.isLocalValueSet())
+ { // Check ValueExpression
+ // @see: UIInput:updateModel(FacesContext context)
+ ValueExpression expression = input.getValueExpression("value");
+ if (expression != null)
+ { // Reset localValue if ValueExpression is set
+ input.resetValue();
+ }
}
+ // we're done here
+ return;
}
// clearLocalValues of all facets and children of this UIComponent
if (comp.getFacetCount() > 0)