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/01/26 09:56:37 UTC
svn commit: r1780345 -
/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommand.java
Author: lofwyr
Date: Thu Jan 26 09:56:37 2017
New Revision: 1780345
URL: http://svn.apache.org/viewvc?rev=1780345&view=rev
Log:
TOBAGO-1684: Button converts to dropdown button when adding an event within its tag
[developed by sub_ft1]
Modified:
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommand.java
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommand.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommand.java?rev=1780345&r1=1780344&r2=1780345&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommand.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommand.java Thu Jan 26 09:56:37 2017
@@ -21,6 +21,7 @@ package org.apache.myfaces.tobago.intern
import org.apache.myfaces.tobago.component.SupportFieldId;
import org.apache.myfaces.tobago.component.SupportsAccessKey;
+import org.apache.myfaces.tobago.component.UIEvent;
import org.apache.myfaces.tobago.component.Visual;
import org.apache.myfaces.tobago.util.ComponentUtils;
import org.slf4j.Logger;
@@ -48,7 +49,9 @@ public abstract class AbstractUICommand
if (parentOfCommands == null) {
parentOfCommands = false;
for (UIComponent child : getChildren()) {
- if (child instanceof UICommand || child instanceof UIInput) {
+ if (child.isRendered()
+ && !(child instanceof UIEvent)
+ && (child instanceof UICommand || child instanceof UIInput)) {
parentOfCommands = true;
break;
}