You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2017/12/06 16:30:57 UTC

[myfaces-tobago] branch master updated (7de2c02 -> 819b80a)

This is an automated email from the ASF dual-hosted git repository.

lofwyr pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git.


    from 7de2c02  set next version
     new 6a53da7  need next version of  * myfaces-master-pom (maintain)  * checkstyle-rule (false positive dependency-check for xbean-finder-shaded)
     new dc207b6  clean up
     new fd9a6a9  less logging
     new 819b80a  TOBAGO-154: Add converter for tab label and box label

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 pom.xml                                                      |  6 +++---
 .../tobago/internal/renderkit/renderer/TabGroupRenderer.java | 11 ++++++++++-
 .../internal/taglib/component/SelectItemTagDeclaration.java  | 10 ++--------
 .../internal/taglib/component/SelectItemsTagDeclaration.java | 11 ++---------
 .../tobago/internal/taglib/component/TabTagDeclaration.java  |  4 +++-
 .../myfaces/tobago/apt/processor/ClassesGenerator.java       | 12 ++++++------
 6 files changed, 26 insertions(+), 28 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
['"commits@myfaces.apache.org" <co...@myfaces.apache.org>'].

[myfaces-tobago] 03/04: less logging

Posted by lo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lofwyr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git

commit fd9a6a9d5eea7ae75d8d32cfea36e84cdc00dd0d
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Wed Dec 6 15:16:42 2017 +0100

    less logging
---
 .../myfaces/tobago/apt/processor/ClassesGenerator.java       | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/processor/ClassesGenerator.java b/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/processor/ClassesGenerator.java
index ab3ad43..c7ea5e3 100644
--- a/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/processor/ClassesGenerator.java
+++ b/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/processor/ClassesGenerator.java
@@ -116,9 +116,9 @@ public class ClassesGenerator extends AbstractGenerator {
 
       if (componentTag.behaviors().length > 0) {
         for (final Behavior behavior : componentTag.behaviors()) {
-          info("*************** ----------------------" + componentTag.behaviors().length);
-          info("*************** " + behavior.name());
-          info("*************** " + componentInfo.getBehaviors());
+//          info("*************** ----------------------" + componentTag.behaviors().length);
+//          info("*************** " + behavior.name());
+//          info("*************** " + componentInfo.getBehaviors());
           componentInfo.getBehaviors().add(behavior.name());
           if (behavior.isDefault()) {
             if (componentInfo.getDefaultBehavior() != null) {
@@ -248,9 +248,9 @@ public class ClassesGenerator extends AbstractGenerator {
         propertyInfo.setDescription(getDescription(declaration));
         propertyInfo.setTransient(uiComponentTagAttribute.isTransient());
         propertyInfo.setGenerate(uiComponentTagAttribute.generate());
-        if (properties.containsKey(name)) {
-          warn("Redefinition of attribute '" + name + "'.");
-        }
+//        if (properties.containsKey(name)) {
+//          warn("Redefinition of attribute '" + name + "'.");
+//        }
         properties.put(name, propertyInfo);
       }
     }

-- 
To stop receiving notification emails like this one, please contact
"commits@myfaces.apache.org" <co...@myfaces.apache.org>.

[myfaces-tobago] 02/04: clean up

Posted by lo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lofwyr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git

commit dc207b6bb5d2ea71ed9ca0378c4d72bc4d370150
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Wed Dec 6 15:16:32 2017 +0100

    clean up
---
 .../internal/taglib/component/SelectItemTagDeclaration.java   | 10 ++--------
 .../internal/taglib/component/SelectItemsTagDeclaration.java  | 11 ++---------
 2 files changed, 4 insertions(+), 17 deletions(-)

diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectItemTagDeclaration.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectItemTagDeclaration.java
index a741bdb..4f6f379 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectItemTagDeclaration.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectItemTagDeclaration.java
@@ -27,6 +27,7 @@ import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasBinding;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasId;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasItemLabel;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasTip;
 import org.apache.myfaces.tobago.internal.taglib.declaration.IsVisual;
 
 /**
@@ -40,7 +41,7 @@ import org.apache.myfaces.tobago.internal.taglib.declaration.IsVisual;
     uiComponentBaseClass = "org.apache.myfaces.tobago.internal.component.AbstractUISelectItem",
     uiComponentFacesClass = "javax.faces.component.UISelectItem",
     allowedChildComponenents = "NONE")
-public interface SelectItemTagDeclaration extends HasBinding, HasId, IsVisual, HasItemLabel {
+public interface SelectItemTagDeclaration extends HasBinding, HasId, IsVisual, HasItemLabel, HasTip {
 
   /**
    * Description of an item, might be rendered as a tool tip.
@@ -82,11 +83,4 @@ public interface SelectItemTagDeclaration extends HasBinding, HasId, IsVisual, H
   @TagAttribute
   @UIComponentTagAttribute()
   void setItemImage(String itemImage);
-
-  /**
-   * Text value to display as tooltip.
-   */
-  @TagAttribute
-  @UIComponentTagAttribute()
-  void setTip(String tip);
 }
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectItemsTagDeclaration.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectItemsTagDeclaration.java
index 69e6cb2..1f883d4 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectItemsTagDeclaration.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectItemsTagDeclaration.java
@@ -27,6 +27,7 @@ import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasBinding;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasId;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasItemLabel;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasTip;
 
 /**
  * Add a child UISelectItems component to the UIComponent
@@ -40,7 +41,7 @@ import org.apache.myfaces.tobago.internal.taglib.declaration.HasItemLabel;
     uiComponentFacesClass = "javax.faces.component.UISelectItems",
     isComponentAlreadyDefined = false,
     allowedChildComponenents = "NONE")
-public interface SelectItemsTagDeclaration extends HasId, HasBinding, HasItemLabel {
+public interface SelectItemsTagDeclaration extends HasId, HasBinding, HasItemLabel, HasTip {
 
   /**
    * Value binding expression pointing at a List or array of SelectItem instances containing
@@ -81,12 +82,4 @@ public interface SelectItemsTagDeclaration extends HasId, HasBinding, HasItemLab
   @TagAttribute
   @UIComponentTagAttribute()
   void setItemImage(String itemImage);
-
-  /**
-   * Text value to display as tooltip.
-   */
-  @TagAttribute
-  @UIComponentTagAttribute()
-  void setTip(String tip);
-
 }

-- 
To stop receiving notification emails like this one, please contact
"commits@myfaces.apache.org" <co...@myfaces.apache.org>.

[myfaces-tobago] 01/04: need next version of * myfaces-master-pom (maintain) * checkstyle-rule (false positive dependency-check for xbean-finder-shaded)

Posted by lo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lofwyr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git

commit 6a53da711f0db92743b6aeaa4dfff6a0e432bd4a
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Wed Dec 6 14:29:27 2017 +0100

    need next version of
     * myfaces-master-pom (maintain)
     * checkstyle-rule (false positive dependency-check for xbean-finder-shaded)
---
 pom.xml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index 6740070..ac91f00 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.myfaces</groupId>
     <artifactId>myfaces</artifactId>
-    <version>16</version>
+    <version>17-SNAPSHOT</version>
   </parent>
   <groupId>org.apache.myfaces.tobago</groupId>
   <artifactId>tobago</artifactId>
@@ -50,7 +50,7 @@
     <required.maven.version>3.0.4</required.maven.version>
     <maven-pmd-plugin.version>3.8</maven-pmd-plugin.version>
     <maven-checkstyle-plugin.version>2.17</maven-checkstyle-plugin.version>
-    <checkstyle-rules.version>8</checkstyle-rules.version>
+    <checkstyle-rules.version>9-SNAPSHOT</checkstyle-rules.version>
   </properties>
 
   <issueManagement>
@@ -995,7 +995,7 @@
           <artifactId>dependency-check-maven</artifactId>
           <version>3.0.2</version>
           <configuration>
-            <failBuildOnCVSS>6</failBuildOnCVSS>
+            <failBuildOnCVSS>0</failBuildOnCVSS>
             <suppressionFile>tobago/dependency-check-suppression.xml</suppressionFile>
           </configuration>
           <dependencies>

-- 
To stop receiving notification emails like this one, please contact
"commits@myfaces.apache.org" <co...@myfaces.apache.org>.

[myfaces-tobago] 04/04: TOBAGO-154: Add converter for tab label and box label

Posted by lo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lofwyr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git

commit 819b80af90053f0d80db61224023ba94fab629ef
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Wed Dec 6 17:27:25 2017 +0100

    TOBAGO-154: Add converter for tab label and box label
---
 .../tobago/internal/renderkit/renderer/TabGroupRenderer.java  | 11 ++++++++++-
 .../tobago/internal/taglib/component/TabTagDeclaration.java   |  4 +++-
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/TabGroupRenderer.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/TabGroupRenderer.java
index b3ca809..ec34c77 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/TabGroupRenderer.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/TabGroupRenderer.java
@@ -224,6 +224,7 @@ public class TabGroupRenderer extends RendererBase implements ComponentSystemEve
         final UITab tab = (UITab) child;
         if (tab.isRendered()) {
           final LabelWithAccessKey label = new LabelWithAccessKey(tab);
+          final UIComponent labelFacet = ComponentUtils.getFacet(tab, Facets.label);
           final boolean disabled = tab.isDisabled();
           final String tabId = tab.getClientId(facesContext);
           Markup markup = tab.getMarkup() != null ? tab.getMarkup() : Markup.NULL;
@@ -281,6 +282,7 @@ public class TabGroupRenderer extends RendererBase implements ComponentSystemEve
           }
           writer.writeAttribute(HtmlAttributes.ROLE, HtmlRoleValues.TAB.toString(), false);
 
+          boolean labelEmpty = true;
           final String image = tab.getImage();
           // tab.getImage() resolves to empty string if el-expression resolves to null
           if (image != null && !image.isEmpty()) {
@@ -288,10 +290,17 @@ public class TabGroupRenderer extends RendererBase implements ComponentSystemEve
             writer.writeAttribute(HtmlAttributes.SRC, image, true);
 // TBD      writer.writeClassAttribute(Classes.create(tab, (label.getLabel() != null? "image-right-margin" : "image")));
             writer.endElement(HtmlElements.IMG);
+            labelEmpty = false;
           }
           if (label.getLabel() != null) {
             HtmlRendererUtils.writeLabelWithAccessKey(writer, label);
-          } else if (image == null) {
+            labelEmpty = false;
+          }
+          if (labelFacet != null) {
+            labelFacet.encodeAll(facesContext);
+            labelEmpty = false;
+          }
+          if (labelEmpty) {
             writer.writeText(Integer.toString(index + 1));
           }
           writer.endElement(HtmlElements.A);
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TabTagDeclaration.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TabTagDeclaration.java
index db2b778..ee3796f 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TabTagDeclaration.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TabTagDeclaration.java
@@ -52,7 +52,9 @@ import javax.faces.component.UIPanel;
     rendererType = RendererTypes.TAB,
     facets = {
         @Facet(name = Facets.BAR,
-            description = "Contains some code to be placed in the header at the bar position.")},
+            description = "Contains some code to be placed in the header at the bar position."),
+        @Facet(name = Facets.LABEL,
+            description = "Contains some code to be placed in the header at the label position.")},
     behaviors = {
         @Behavior(
             name = ClientBehaviors.CLICK,

-- 
To stop receiving notification emails like this one, please contact
"commits@myfaces.apache.org" <co...@myfaces.apache.org>.