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/09/27 13:00:58 UTC

[myfaces-tobago] branch master updated (79e67a1 -> 0208e2d)

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 79e67a1  fixed docs for cloning of branches
     new 9111da7  TOBAGO-1795: Set Java Source to Java 8 * remove unneeded explicit type
     new 3ab2764  Demo works now better with Mojarra
     new d2ca2ab  optimize logging
     new 0208e2d  Merge remote-tracking branch 'origin/master'

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:
 .../java/org/apache/myfaces/tobago/context/TobagoBundle.java     | 2 +-
 .../apache/myfaces/tobago/internal/behavior/EventBehavior.java   | 2 +-
 .../myfaces/tobago/internal/component/AbstractUISheet.java       | 2 +-
 .../internal/renderkit/renderer/SheetPageCommandRenderer.java    | 4 ++--
 .../tobago/internal/renderkit/renderer/SheetRenderer.java        | 4 ++--
 .../tobago/internal/renderkit/renderer/SuggestRenderer.java      | 2 +-
 .../myfaces/tobago/internal/config/AbstractTobagoTestBase.java   | 5 ++---
 .../java/org/apache/myfaces/tobago/example/data/SolarObject.java | 2 +-
 .../org/apache/myfaces/tobago/example/demo/NavigationTree.java   | 1 -
 .../tobago/example/demo/PrettyUrlForMenuNavigationHandler.java   | 3 +--
 .../tobago/example/demo/SynchronizeNavigationPhaseListener.java  | 4 +++-
 .../content/{40-test/3000-sheet/sheet.xhtml => root-dummy.xhtml} | 9 +++------
 12 files changed, 18 insertions(+), 22 deletions(-)
 copy tobago-example/tobago-example-demo/src/main/webapp/content/{40-test/3000-sheet/sheet.xhtml => root-dummy.xhtml} (89%)

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

[myfaces-tobago] 01/04: TOBAGO-1795: Set Java Source to Java 8 * remove unneeded explicit type

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 9111da7f1b573c1e003aeaf2c5c4cd92c0baf689
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Thu Sep 21 10:29:50 2017 +0200

    TOBAGO-1795: Set Java Source to Java 8
    * remove unneeded explicit type
---
 .../main/java/org/apache/myfaces/tobago/context/TobagoBundle.java    | 2 +-
 .../org/apache/myfaces/tobago/internal/behavior/EventBehavior.java   | 2 +-
 .../apache/myfaces/tobago/internal/component/AbstractUISheet.java    | 2 +-
 .../myfaces/tobago/internal/renderkit/renderer/SheetRenderer.java    | 4 ++--
 .../myfaces/tobago/internal/renderkit/renderer/SuggestRenderer.java  | 2 +-
 .../myfaces/tobago/internal/config/AbstractTobagoTestBase.java       | 5 ++---
 .../java/org/apache/myfaces/tobago/example/data/SolarObject.java     | 2 +-
 .../tobago/example/demo/PrettyUrlForMenuNavigationHandler.java       | 3 +--
 8 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/context/TobagoBundle.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/context/TobagoBundle.java
index 28c82a4..da7bd51 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/context/TobagoBundle.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/context/TobagoBundle.java
@@ -64,7 +64,7 @@ public class TobagoBundle extends ResourceBundle {
 
   @Override
   public Enumeration<String> getKeys() {
-    return Collections.enumeration(Collections.<String>emptyList());
+    return Collections.enumeration(Collections.emptyList());
   }
 
   public String getBundleName() {
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/behavior/EventBehavior.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/behavior/EventBehavior.java
index 8e4468c..5faafbe 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/behavior/EventBehavior.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/behavior/EventBehavior.java
@@ -274,7 +274,7 @@ public class EventBehavior extends ClientBehaviorBase {
   private Collection<String> evalForCollection(String attributeName) {
     Object value = getStateHelper().eval(attributeName);
     if (value == null) {
-      return Collections.<String>emptyList();
+      return Collections.emptyList();
     } else if (value instanceof Collection) {
       return (Collection<String>) value;
     } else if (value instanceof String) {
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheet.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheet.java
index 1d1d0d7..deed9bb 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheet.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheet.java
@@ -315,7 +315,7 @@ public abstract class AbstractUISheet extends AbstractUIData
     final SheetState state = getSheetState(context);
     if (state != null) {
       final List<Integer> list = (List<Integer>) ComponentUtils.getAttribute(this, Attributes.selectedListString);
-      state.setSelectedRows(list != null ? list : Collections.<Integer>emptyList());
+      state.setSelectedRows(list != null ? list : Collections.emptyList());
       ComponentUtils.removeAttribute(this, Attributes.selectedListString);
       ComponentUtils.removeAttribute(this, Attributes.scrollPosition);
     }
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SheetRenderer.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SheetRenderer.java
index c772096..e8e5ee9 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SheetRenderer.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SheetRenderer.java
@@ -227,11 +227,11 @@ public class SheetRenderer extends RendererBase {
     final List<AbstractUIColumnBase> columns = sheet.getAllColumns();
     final boolean autoLayout = sheet.isAutoLayout();
 
-    ensureColumnWidthsSize(columnWidths, columns, Collections.<Integer>emptyList());
+    ensureColumnWidthsSize(columnWidths, columns, Collections.emptyList());
 
     if (!autoLayout) {
       encodeHiddenInput(writer,
-          JsonUtils.encode(definedColumnWidths ? columnWidths : Collections.<Integer>emptyList()),
+          JsonUtils.encode(definedColumnWidths ? columnWidths : Collections.emptyList()),
           sheetId + SUFFIX_WIDTHS);
 
       final ArrayList<String> encodedRendered = new ArrayList<>();
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SuggestRenderer.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SuggestRenderer.java
index 98bce52..af90a8c 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SuggestRenderer.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SuggestRenderer.java
@@ -155,7 +155,7 @@ public class SuggestRenderer extends RendererBase {
             + "Elements needs to be " + String.class.getName() + " or " + AutoSuggestItem.class.getName());
       }
     } else {
-      autoSuggestItems.setItems(Collections.<AutoSuggestItem>emptyList());
+      autoSuggestItems.setItems(Collections.emptyList());
     }
     return autoSuggestItems;
   }
diff --git a/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/config/AbstractTobagoTestBase.java b/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/config/AbstractTobagoTestBase.java
index beff44e..748d67b 100644
--- a/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/config/AbstractTobagoTestBase.java
+++ b/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/config/AbstractTobagoTestBase.java
@@ -29,7 +29,6 @@ import org.apache.myfaces.tobago.component.UIOut;
 import org.apache.myfaces.tobago.component.UIPanel;
 import org.apache.myfaces.tobago.component.UIPopup;
 import org.apache.myfaces.tobago.config.TobagoConfig;
-import org.apache.myfaces.tobago.context.Theme;
 import org.apache.myfaces.tobago.context.ThemeImpl;
 import org.apache.myfaces.tobago.context.TobagoContext;
 import org.apache.myfaces.tobago.internal.mock.faces.MockTheme;
@@ -77,8 +76,8 @@ public abstract class AbstractTobagoTestBase extends AbstractJsfTestCase {
     // Tobago specific extensions
 
     final TobagoConfigImpl tobagoConfig = TobagoConfigMergingUnitTest.loadAndMerge("tobago-config-for-unit-tests.xml");
-    final ThemeImpl theme = new MockTheme("default", "Default Mock Theme", Collections.<Theme>emptyList());
-    final ThemeImpl one = new MockTheme("one", "Mock Theme One", Collections.singletonList((Theme) theme));
+    final ThemeImpl theme = new MockTheme("default", "Default Mock Theme", Collections.emptyList());
+    final ThemeImpl one = new MockTheme("one", "Mock Theme One", Collections.singletonList(theme));
     tobagoConfig.addAvailableTheme(theme);
     tobagoConfig.addAvailableTheme(one);
     tobagoConfig.resolveThemes();
diff --git a/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/SolarObject.java b/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/SolarObject.java
index b8f12d8..4d77f56 100644
--- a/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/SolarObject.java
+++ b/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/SolarObject.java
@@ -183,7 +183,7 @@ public class SolarObject {
   }
 
   public List<Element> getChemicalComposition() {
-    return chemicalComposition != null ? chemicalComposition : Collections.<Element>emptyList();
+    return chemicalComposition != null ? chemicalComposition : Collections.emptyList();
   }
 
   public void setChemicalComposition(final List<Element> chemicalComposition) {
diff --git a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/PrettyUrlForMenuNavigationHandler.java b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/PrettyUrlForMenuNavigationHandler.java
index bbd7169..b766ad8 100644
--- a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/PrettyUrlForMenuNavigationHandler.java
+++ b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/PrettyUrlForMenuNavigationHandler.java
@@ -28,7 +28,6 @@ import javax.faces.context.ExternalContext;
 import javax.faces.context.FacesContext;
 import java.io.IOException;
 import java.util.Collections;
-import java.util.List;
 
 public class PrettyUrlForMenuNavigationHandler extends NavigationHandler {
 
@@ -49,7 +48,7 @@ public class PrettyUrlForMenuNavigationHandler extends NavigationHandler {
       try {
         externalContext.redirect(
             externalContext.encodeRedirectURL(externalContext.getRequestContextPath() + outcome,
-            Collections.<String, List<String>>emptyMap()));
+            Collections.emptyMap()));
       } catch (final IOException e) {
         // not nice?
         facesContext.renderResponse();

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

[myfaces-tobago] 03/04: optimize 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 d2ca2abaab130f09012aff509e693097059d47d9
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Thu Sep 21 17:08:01 2017 +0200

    optimize logging
---
 .../tobago/internal/renderkit/renderer/SheetPageCommandRenderer.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SheetPageCommandRenderer.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SheetPageCommandRenderer.java
index 2851038..4b9707f 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SheetPageCommandRenderer.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SheetPageCommandRenderer.java
@@ -43,8 +43,8 @@ public class SheetPageCommandRenderer extends LinkRenderer {
     final String sourceId = facesContext.getExternalContext().getRequestParameterMap().get("javax.faces.source");
     final String clientId = component.getClientId(facesContext);
     if (LOG.isDebugEnabled()) {
-      LOG.debug("sourceId = '" + sourceId + "'");
-      LOG.debug("clientId = '" + clientId + "'");
+      LOG.debug("sourceId = '{}'", sourceId);
+      LOG.debug("clientId = '{}'", clientId);
     }
 
     if (clientId.equals(sourceId)) {

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

[myfaces-tobago] 02/04: Demo works now better with Mojarra

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 3ab2764e396b7423d9c1bb3f103ed8f3d49db24a
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Thu Sep 21 15:12:38 2017 +0200

    Demo works now better with Mojarra
---
 .../tobago/example/demo/NavigationTree.java        |  1 -
 .../demo/SynchronizeNavigationPhaseListener.java   |  4 +++-
 .../src/main/webapp/content/root-dummy.xhtml       | 24 ++++++++++++++++++++++
 3 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/NavigationTree.java b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/NavigationTree.java
index 2703ff2..72ae677 100644
--- a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/NavigationTree.java
+++ b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/NavigationTree.java
@@ -69,7 +69,6 @@ public class NavigationTree implements Serializable {
     servletContext = (ServletContext) FacesContext.getCurrentInstance().getExternalContext().getContext();
     final List<String> list = locateResourcesInWar(servletContext, "/content", new ArrayList<>());
 
-    list.add("/content/root-dummy.xhtml"); // helps to build the tree, this is not an existing file
     final List<NavigationNode> nodes = new ArrayList<>();
     for (final String path : list) {
 
diff --git a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SynchronizeNavigationPhaseListener.java b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SynchronizeNavigationPhaseListener.java
index d827826..f32431a 100644
--- a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SynchronizeNavigationPhaseListener.java
+++ b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SynchronizeNavigationPhaseListener.java
@@ -19,6 +19,8 @@
 
 package org.apache.myfaces.tobago.example.demo;
 
+import org.apache.myfaces.tobago.internal.component.AbstractUIPage;
+import org.apache.myfaces.tobago.util.ComponentUtils;
 import org.apache.myfaces.tobago.util.VariableResolverUtils;
 
 import javax.faces.component.UIViewRoot;
@@ -54,7 +56,7 @@ public class SynchronizeNavigationPhaseListener implements PhaseListener {
     final FacesContext facesContext = FacesContext.getCurrentInstance();
     final UIViewRoot viewRoot = facesContext.getViewRoot();
     // in case of direct links the ViewRoot is empty after "restore view".
-    if (viewRoot != null && viewRoot.getChildCount() == 0) {
+    if (viewRoot != null && ComponentUtils.findChild(viewRoot, AbstractUIPage.class) == null) {
       final String viewId = viewRoot.getViewId();
       final NavigationTree navigation
           = (NavigationTree) VariableResolverUtils.resolveVariable(facesContext, "navigationTree");
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/root-dummy.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/root-dummy.xhtml
new file mode 100644
index 0000000..613a6ba
--- /dev/null
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/root-dummy.xhtml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+
+<ui:composition template="/plain.xhtml"
+                xmlns="http://www.w3.org/1999/xhtml"
+                xmlns:ui="http://java.sun.com/jsf/facelets">
+  Root Dummy
+</ui:composition>

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

[myfaces-tobago] 04/04: Merge remote-tracking branch 'origin/master'

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 0208e2d08e35f7fa694644d87874d700cab24dce
Merge: d2ca2ab 79e67a1
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Wed Sep 27 15:00:41 2017 +0200

    Merge remote-tracking branch 'origin/master'

 src/site/apt/getting-started.apt                   |  6 +++---
 .../myfaces/tobago/component/Attributes.java       |  5 +++++
 .../facelets/SegmentLayoutConstraintHandler.java   | 11 +++++++++++
 .../myfaces/tobago/facelets/SegmentLayoutRule.java | 16 ++++++++++++++++
 .../renderkit/renderer/SegmentLayoutRenderer.java  |  3 ++-
 .../SegmentLayoutConstraintTagDeclaration.java     |  6 ++++++
 .../component/SegmentLayoutTagDeclaration.java     | 14 ++++++++++----
 .../tobago/renderkit/css/BootstrapClass.java       | 22 +++++++++++++++++++++-
 .../16-layout/30-segment/segment-layout.xhtml      | 21 +++++++++++----------
 9 files changed, 85 insertions(+), 19 deletions(-)

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