You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@empire-db.apache.org by do...@apache.org on 2019/11/27 18:44:18 UTC
[empire-db] branch master updated: EMPIREDB-317 Bugfix e:input
inside ui:repeat
This is an automated email from the ASF dual-hosted git repository.
doebele 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 77a3c91 EMPIREDB-317 Bugfix e:input inside ui:repeat
77a3c91 is described below
commit 77a3c91854fb7cd58e2789dfb8fb013e09baf33e
Author: Rainer Döbele <do...@apache.org>
AuthorDate: Wed Nov 27 19:44:13 2019 +0100
EMPIREDB-317
Bugfix e:input inside ui:repeat
---
.../org/apache/empire/jsf2/components/InputTag.java | 2 +-
.../org/apache/empire/jsf2/utils/TagEncodingHelper.java | 17 ++++++++++++-----
2 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/InputTag.java b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/InputTag.java
index f38208e..cec5a1f 100644
--- a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/InputTag.java
+++ b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/InputTag.java
@@ -88,6 +88,7 @@ public class InputTag extends UIInput implements NamingContainer
protected boolean initState(FacesContext context)
{
// Check visibility
+ helper.prepareData();
if (helper.isVisible() == false)
return false; // not visible
// Read only State
@@ -100,7 +101,6 @@ public class InputTag extends UIInput implements NamingContainer
return false;
}
// Init Control and inputInfo;
- helper.prepareData();
control = helper.getInputControl();
inpInfo = helper.getInputInfo(context);
return (control != null && inpInfo != null);
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 ae83f15..9b9af08 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
@@ -644,8 +644,8 @@ public class TagEncodingHelper implements NamingContainer
public Object getRecord()
{
- if (record == null)
- record = findRecord();
+ if (record == null && (record=findRecord())!=null)
+ setRecord(record);
return record;
}
@@ -830,11 +830,18 @@ public class TagEncodingHelper implements NamingContainer
public boolean isVisible()
{
// reset record
- if (this.record!=null && (getTagAttributeValue("record") instanceof Record))
- this.record=null;
+ if (this.record!=null)
+ { // Check attribute
+ Object recordTagValue = getTagAttributeValue("record");
+ if ((recordTagValue instanceof DBRecord) && this.record!=recordTagValue)
+ { // shoud not come here
+ log.warn("Record in call to IsVisible has unexpectedly changed!");
+ this.record=null;
+ }
+ }
// Check Record
if ((getRecord() instanceof Record))
- { // Ask Record
+ { // Ask Record
Record r = (Record) record;
return r.isFieldVisible(getColumn());
}