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 2021/02/03 14:57:52 UTC

[myfaces-tobago] branch master updated: refactor: optimize getter / class structure

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


The following commit(s) were added to refs/heads/master by this push:
     new 6e68f9d  refactor: optimize getter / class structure
6e68f9d is described below

commit 6e68f9dd49a2d7562b476cece11ceeba9e46d3e8
Author: Udo Schnurpfeil <ud...@irian.eu>
AuthorDate: Wed Feb 3 15:16:38 2021 +0100

    refactor: optimize getter / class structure
---
 .../org/apache/myfaces/tobago/internal/component/AbstractUICommand.java | 2 ++
 .../org/apache/myfaces/tobago/internal/component/AbstractUILink.java    | 2 --
 .../myfaces/tobago/internal/renderkit/renderer/CommandRendererBase.java | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommand.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommand.java
index 08778c4..fc08d22 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommand.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommand.java
@@ -58,6 +58,8 @@ public abstract class AbstractUICommand extends AbstractUICommandBase
     return parentOfCommands;
   }
 
+  public abstract java.lang.String getImage();
+
   @Override
   public abstract String getLabel();
 
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUILink.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUILink.java
index 9ae53f2..e532f41 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUILink.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUILink.java
@@ -26,7 +26,5 @@ import org.apache.myfaces.tobago.component.SupportsAccessKey;
  */
 public abstract class AbstractUILink extends AbstractUICommand implements SupportsAccessKey {
 
-  public abstract java.lang.String getImage();
-
   public abstract Integer getTabIndex();
 }
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/CommandRendererBase.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/CommandRendererBase.java
index 05c2b45..3aa1f7b 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/CommandRendererBase.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/CommandRendererBase.java
@@ -136,7 +136,7 @@ public abstract class CommandRendererBase<T extends AbstractUICommand> extends D
       encodeBehavior(writer, facesContext, component);
     }
 
-    final String image = ComponentUtils.getStringAttribute(component, Attributes.image);
+    final String image = component.getImage();
     HtmlRendererUtils.encodeIconOrImage(writer, image);
 
     if (label.getLabel() != null) {