From commits-return-62581-apmail-myfaces-commits-archive=myfaces.apache.org@myfaces.apache.org Thu Jul 7 09:24:17 2016 Return-Path: X-Original-To: apmail-myfaces-commits-archive@www.apache.org Delivered-To: apmail-myfaces-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1EF8F10401 for ; Thu, 7 Jul 2016 09:24:17 +0000 (UTC) Received: (qmail 55837 invoked by uid 500); 7 Jul 2016 09:24:17 -0000 Delivered-To: apmail-myfaces-commits-archive@myfaces.apache.org Received: (qmail 55773 invoked by uid 500); 7 Jul 2016 09:24:17 -0000 Mailing-List: contact commits-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list commits@myfaces.apache.org Received: (qmail 55764 invoked by uid 99); 7 Jul 2016 09:24:17 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jul 2016 09:24:17 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 76D92C0155 for ; Thu, 7 Jul 2016 09:24:16 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.426 X-Spam-Level: X-Spam-Status: No, score=-0.426 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id aTkWglcIxoWt for ; Thu, 7 Jul 2016 09:24:15 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 8526B5FB6F for ; Thu, 7 Jul 2016 09:24:15 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 9D901E0223 for ; Thu, 7 Jul 2016 09:24:14 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id BE2653A0051 for ; Thu, 7 Jul 2016 09:24:13 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1751765 - /myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetRenderer.java Date: Thu, 07 Jul 2016 09:24:13 -0000 To: commits@myfaces.apache.org From: lofwyr@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160707092413.BE2653A0051@svn01-us-west.apache.org> Author: lofwyr Date: Thu Jul 7 09:24:13 2016 New Revision: 1751765 URL: http://svn.apache.org/viewvc?rev=1751765&view=rev Log: simplify code Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetRenderer.java Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetRenderer.java URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetRenderer.java?rev=1751765&r1=1751764&r2=1751765&view=diff ============================================================================== --- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetRenderer.java (original) +++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetRenderer.java Thu Jul 7 09:24:13 2016 @@ -1149,17 +1149,15 @@ public class SheetRenderer extends Rende final UISheet sheet, final FacesContext facesContext, final TobagoResponseWriter writer) throws IOException { CommandMap commandMap = null; for (final UIComponent child : sheet.getChildren()) { - if (child instanceof UIColumnEvent) { + if (child instanceof UIColumnEvent && child.isRendered()) { final UIColumnEvent columnEvent = (UIColumnEvent) child; - if (columnEvent.isRendered()) { - final UIComponent selectionChild = child.getChildren().get(0); - if (selectionChild != null && selectionChild instanceof AbstractUICommand && selectionChild.isRendered()) { - final UICommand action = (UICommand) selectionChild; - if (commandMap == null) { - commandMap = new CommandMap(); - } - commandMap.addCommand(columnEvent.getEvent(), new Command(facesContext, action, (String) null)); + final UIComponent selectionChild = child.getChildren().get(0); + if (selectionChild != null && selectionChild instanceof AbstractUICommand && selectionChild.isRendered()) { + final UICommand action = (UICommand) selectionChild; + if (commandMap == null) { + commandMap = new CommandMap(); } + commandMap.addCommand(columnEvent.getEvent(), new Command(facesContext, action, (String) null)); } } }