henningn commented on a change in pull request #123:
URL: https://github.com/apache/myfaces-tobago/pull/123#discussion_r439454604



##########
File path: 
tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUILinks.java
##########
@@ -19,12 +19,28 @@
 
 package org.apache.myfaces.tobago.internal.component;
 
+import org.apache.myfaces.tobago.component.SupportsDisabled;
 import org.apache.myfaces.tobago.layout.Orientation;
 
 /**
  * {@link 
org.apache.myfaces.tobago.internal.taglib.component.LinksTagDeclaration}
  */
-public abstract class AbstractUILinks extends AbstractUIPanelBase {
+public abstract class AbstractUILinks extends AbstractUIPanelBase implements 
SupportsDisabled {
+
+  enum PropertyKeys {
+    disabled,
+  }
 
   public abstract Orientation getOrientation();
+
+  @Override
+  public boolean isDisabled() {

Review comment:
       I think getter/setter for disabled could be generated. So it's no need 
to implement it here.

##########
File path: 
tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIButtons.java
##########
@@ -19,12 +19,28 @@
 
 package org.apache.myfaces.tobago.internal.component;
 
+import org.apache.myfaces.tobago.component.SupportsDisabled;
 import org.apache.myfaces.tobago.layout.Orientation;
 
 /**
  * {@link 
org.apache.myfaces.tobago.internal.taglib.component.ButtonsTagDeclaration}
  */
-public abstract class AbstractUIButtons extends AbstractUIPanelBase {
+public abstract class AbstractUIButtons extends AbstractUIPanelBase implements 
SupportsDisabled {
+
+  enum PropertyKeys {
+    disabled,
+  }
 
   public abstract Orientation getOrientation();
+
+  @Override
+  public boolean isDisabled() {

Review comment:
       I think getter/setter for disabled could be generated. So it's no need 
to implement it here.

##########
File path: 
tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/LinksRenderer.java
##########
@@ -48,6 +49,9 @@ public void encodeBegin(final FacesContext facesContext, 
final UIComponent compo
         getExtraCssItem(),
         Orientation.vertical.equals(links.getOrientation()) ? 
BootstrapClass.FLEX_COLUMN : null,
         links.getCustomClass());
+    if (links.isDisabled()) {

Review comment:
       The HTML DIV tag includes the global attributes but no "disabled" 
attribute.
   See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div
   
   Imho the "disabled" attribute should not be rendered.

##########
File path: 
tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/LinksTagDeclaration.java
##########
@@ -43,4 +45,11 @@
     },
     rendererType = {RendererTypes.LINKS, RendererTypes.LINKS_INSIDE_BAR})
 public interface LinksTagDeclaration extends HasIdBindingAndRendered, 
IsVisual, HasTip, HasOrientation {
+
+  /**
+   * Flag indicating that this element and all children are disabled.
+   */
+  @TagAttribute()
+  @UIComponentTagAttribute(type = "boolean", generate = false)

Review comment:
       I think getter/setter for disabled could be generated. Remove "generate 
= false".

##########
File path: 
tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ButtonsTagDeclaration.java
##########
@@ -46,4 +48,10 @@
 public interface ButtonsTagDeclaration
     extends HasIdBindingAndRendered, IsVisual, HasTip, HasOrientation {
 
+  /**
+   * Flag indicating that this element and all children are disabled.
+   */
+  @TagAttribute()
+  @UIComponentTagAttribute(type = "boolean", generate = false)

Review comment:
       I think getter/setter for disabled could be generated. Remove "generate 
= false".

##########
File path: 
tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/ButtonsRenderer.java
##########
@@ -57,6 +57,9 @@ public void encodeBegin(final FacesContext facesContext, 
final UIComponent compo
             ? BootstrapClass.BTN_GROUP_VERTICAL : BootstrapClass.BTN_GROUP,
         buttons.getCustomClass());
     writer.writeAttribute(HtmlAttributes.ROLE, 
HtmlRoleValues.GROUP.toString(), false);
+    if (buttons.isDisabled()) {

Review comment:
       The HTML DIV tag includes the global attributes but no "disabled" 
attribute.
   See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div
   
   Imho the "disabled" attribute should not be rendered.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to