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 1044a39b EMPIREDB-439 ControlTag: visible attribute added
1044a39b is described below

commit 1044a39baf2c6f2f8757712654289cfc7d1e65a7
Author: Rainer Döbele <[email protected]>
AuthorDate: Sat Oct 12 13:09:27 2024 +0200

    EMPIREDB-439
    ControlTag: visible attribute added
---
 .../main/java/org/apache/empire/jsf2/components/FormGridTag.java    | 2 +-
 .../main/java/org/apache/empire/jsf2/utils/TagEncodingHelper.java   | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git 
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/FormGridTag.java
 
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/FormGridTag.java
index c0e58ee1..80a014b6 100644
--- 
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/FormGridTag.java
+++ 
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/FormGridTag.java
@@ -112,7 +112,7 @@ public class FormGridTag extends UIOutput // implements 
NamingContainer
             {   // label facet
                 placeholderFacet.encodeAll(context);
             }
-            else if (renderPlaceholder)
+            else if (renderPlaceholder || 
ObjectUtils.getBoolean(controlTag.getAttributes().get("placeholder")))
             {   // render placeholder   
                 ResponseWriter writer = context.getResponseWriter();
                 String placeholderTag = (CONTROL_TAG!=null ? CONTROL_TAG : 
INPUT_WRAPPER_TAG);
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 9271cf0a..2f9df6d7 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
@@ -937,6 +937,12 @@ public class TagEncodingHelper implements NamingContainer
 
     public boolean isVisible()
     {
+        // check attribute
+        Object val = getTagAttributeValue("visible");
+        if (!ObjectUtils.isEmpty(val))
+        {   // override
+            return ObjectUtils.getBoolean(val);
+        }
         // reset record
         if (this.record!=null)
         {   // Check attribute

Reply via email to