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 2015/04/29 22:32:17 UTC

svn commit: r1676852 - in /myfaces/tobago/branches/tobago-3.0.x: ./ tobago-core/src/main/java/org/apache/myfaces/tobago/component/ tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/ tobago-core/src/main/java/org/apache/myfaces/toba...

Author: lofwyr
Date: Wed Apr 29 20:32:16 2015
New Revision: 1676852

URL: http://svn.apache.org/r1676852
Log:
clean up deprecation

Added:
    myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/FooterTagDeclaration.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/HeaderTagDeclaration.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/NavTagDeclaration.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/test/flexLayout/flexLayout-vertical.xhtml
      - copied, changed from r1673812, myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/test/flexLayout/flexLayout-horizontal.xhtml
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FooterRenderer.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/HeaderRenderer.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/NavRenderer.java
Removed:
    myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/layout/LayoutContext.java
Modified:
    myfaces/tobago/branches/tobago-3.0.x/tobago-3.0.txt
    myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/component/RendererTypes.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIColumnLayout.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommand.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFlexLayout.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFlowLayout.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPage.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPanel.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPopup.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheet.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheetLayout.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITabGroup.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITabGroupLayout.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/LayoutManager.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/DataAttributes.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlElements.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRoleValues.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/util/EncodeAjaxCallback.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/renderkit/html/DataAttributesUnitTest.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/layout/overview.xhtml
    myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/menu.xhtml
    myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/test/flexLayout/flexLayout-horizontal.xhtml
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/BootstrapClass.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandRenderer.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PageRenderer.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PopupRendererOld.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-layout.js
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-3.0.txt
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-3.0.txt?rev=1676852&r1=1676851&r2=1676852&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-3.0.txt (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-3.0.txt Wed Apr 29 20:32:16 2015
@@ -15,6 +15,8 @@ Todo:
 
   - how to use: for best performance and responsive use tc:flexLayout instead of tc:gridLayout
 
+  - consolidate LinkRenderer, ButtonRenderer with CommandRenderer
+
 Done:
 
   - Removing tc:cell tag, please use tc:panel instead.

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/component/RendererTypes.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/component/RendererTypes.java?rev=1676852&r1=1676851&r2=1676852&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/component/RendererTypes.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/component/RendererTypes.java Wed Apr 29 20:32:16 2015
@@ -40,8 +40,10 @@ public final class RendererTypes {
   public static final String FILE = "File";
   public static final String FLEX_LAYOUT = "FlexLayout";
   public static final String FLOW_LAYOUT = "FlowLayout";
+  public static final String FOOTER = "Footer";
   public static final String FORM = "Form";
   public static final String GRID_LAYOUT = "GridLayout";
+  public static final String HEADER = "Header";
   public static final String HIDDEN = "Hidden";
   public static final String IN = "In";
   public static final String IMAGE = "Image";
@@ -53,6 +55,7 @@ public final class RendererTypes {
   public static final String MENU_BAR = "MenuBar";
   public static final String MENU_COMMAND = "MenuCommand";
   public static final String MENU_SEPARATOR = "MenuSeparator";
+  public static final String NAV = "Nav";
   public static final String OBJECT = "Object";
   public static final String OUT = "Out";
   public static final String PAGE = "Page";

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIColumnLayout.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIColumnLayout.java?rev=1676852&r1=1676851&r2=1676852&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIColumnLayout.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIColumnLayout.java Wed Apr 29 20:32:16 2015
@@ -21,8 +21,6 @@ package org.apache.myfaces.tobago.intern
 
 import org.apache.myfaces.tobago.component.SupportsMarkup;
 import org.apache.myfaces.tobago.layout.ColumnPartition;
-import org.apache.myfaces.tobago.layout.LayoutComponent;
-import org.apache.myfaces.tobago.layout.LayoutContainer;
 import org.apache.myfaces.tobago.layout.LayoutManager;
 
 /**
@@ -32,6 +30,7 @@ public abstract class AbstractUIColumnLa
 
   public static final String COMPONENT_FAMILY = "org.apache.myfaces.tobago.BootstrapLayout";
 
+/*
   public void init() {
     for (final LayoutComponent component : getLayoutContainer().getComponents()) {
       if (component instanceof LayoutContainer && component.isRendered()) {
@@ -40,7 +39,6 @@ public abstract class AbstractUIColumnLa
     }
   }
 
-/*
   public void fixRelativeInsideAuto(final Orientation orientation, final boolean auto) {
   }
 

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommand.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommand.java?rev=1676852&r1=1676851&r2=1676852&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommand.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommand.java Wed Apr 29 20:32:16 2015
@@ -38,6 +38,9 @@ public abstract class AbstractUICommand
     extends UICommand
     implements SupportsRenderedPartially, SupportsAccessKey, OnComponentPopulated, LayoutComponent {
 
+  // todo: transient
+  private Boolean parentOfCommands;
+
   public void onComponentPopulated(final FacesContext facesContext, final UIComponent parent) {
     final AbstractUIPopup popup = (AbstractUIPopup) getFacet(Facets.POPUP);
     if (popup != null) {
@@ -84,6 +87,19 @@ public abstract class AbstractUICommand
     }
   }
 
+  public boolean isParentOfCommands() {
+    if (parentOfCommands == null) {
+      parentOfCommands = false;
+      for (UIComponent child : getChildren()) {
+        if (child instanceof UICommand) {
+          parentOfCommands = true;
+          break;
+        }
+      }
+    }
+    return parentOfCommands;
+  }
+
   public abstract String getLabel();
 
   public abstract boolean isJsfResource();

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFlexLayout.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFlexLayout.java?rev=1676852&r1=1676851&r2=1676852&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFlexLayout.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFlexLayout.java Wed Apr 29 20:32:16 2015
@@ -20,10 +20,7 @@
 package org.apache.myfaces.tobago.internal.component;
 
 import org.apache.myfaces.tobago.component.SupportsMarkup;
-import org.apache.myfaces.tobago.layout.LayoutComponent;
-import org.apache.myfaces.tobago.layout.LayoutContainer;
 import org.apache.myfaces.tobago.layout.LayoutManager;
-import org.apache.myfaces.tobago.layout.Orientation;
 
 /**
  * TODO
@@ -32,6 +29,7 @@ public abstract class AbstractUIFlexLayo
 
   public static final String COMPONENT_FAMILY = "org.apache.myfaces.tobago.FlexLayout";
 
+/*
   public void init() {
     for (final LayoutComponent component : getLayoutContainer().getComponents()) {
       if (component instanceof LayoutContainer && component.isRendered()) {
@@ -40,7 +38,6 @@ public abstract class AbstractUIFlexLayo
     }
   }
 
-/*
   public void fixRelativeInsideAuto(final Orientation orientation, final boolean auto) {
   }
 

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFlowLayout.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFlowLayout.java?rev=1676852&r1=1676851&r2=1676852&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFlowLayout.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFlowLayout.java Wed Apr 29 20:32:16 2015
@@ -20,15 +20,13 @@
 package org.apache.myfaces.tobago.internal.component;
 
 import org.apache.myfaces.tobago.component.SupportsMarkup;
-import org.apache.myfaces.tobago.layout.LayoutComponent;
-import org.apache.myfaces.tobago.layout.LayoutContainer;
 import org.apache.myfaces.tobago.layout.LayoutManager;
-import org.apache.myfaces.tobago.layout.Orientation;
 
 public abstract class AbstractUIFlowLayout extends AbstractUILayoutBase implements LayoutManager, SupportsMarkup {
 
   public static final String COMPONENT_FAMILY = "org.apache.myfaces.tobago.FlowLayout";
 
+/*
   public void init() {
     for (final LayoutComponent component : getLayoutContainer().getComponents()) {
       if (component instanceof LayoutContainer && component.isRendered()) {
@@ -37,7 +35,6 @@ public abstract class AbstractUIFlowLayo
     }
   }
 
-/*
   public void fixRelativeInsideAuto(final Orientation orientation, final boolean auto) {
   }
 

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java?rev=1676852&r1=1676851&r2=1676852&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java Wed Apr 29 20:32:16 2015
@@ -64,9 +64,11 @@ public abstract class AbstractUIGridLayo
       if (LOG.isDebugEnabled()) {
         LOG.debug("\n" + grid);
       }
+/*
       if (component instanceof LayoutContainer && (component.isRendered() || isRigid())) {
         ((LayoutContainer) component).getLayoutManager().init();
       }
+*/
     }
 
     grid.setColumnOverflow(isColumnOverflow());

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPage.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPage.java?rev=1676852&r1=1676851&r2=1676852&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPage.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPage.java Wed Apr 29 20:32:16 2015
@@ -21,11 +21,9 @@ package org.apache.myfaces.tobago.intern
 
 import org.apache.myfaces.tobago.ajax.AjaxUtils;
 import org.apache.myfaces.tobago.component.Attributes;
-import org.apache.myfaces.tobago.component.ComponentTypes;
 import org.apache.myfaces.tobago.component.DeprecatedDimension;
 import org.apache.myfaces.tobago.component.Facets;
 import org.apache.myfaces.tobago.component.OnComponentPopulated;
-import org.apache.myfaces.tobago.component.RendererTypes;
 import org.apache.myfaces.tobago.internal.ajax.AjaxInternalUtils;
 import org.apache.myfaces.tobago.internal.ajax.AjaxResponseRenderer;
 import org.apache.myfaces.tobago.internal.layout.LayoutUtils;
@@ -41,7 +39,6 @@ import org.apache.myfaces.tobago.model.P
 import org.apache.myfaces.tobago.model.PageStateImpl;
 import org.apache.myfaces.tobago.util.ApplyRequestValuesCallback;
 import org.apache.myfaces.tobago.util.ComponentUtils;
-import org.apache.myfaces.tobago.util.CreateComponentUtils;
 import org.apache.myfaces.tobago.util.DebugUtils;
 import org.apache.myfaces.tobago.util.FacesVersion;
 import org.apache.myfaces.tobago.util.ProcessValidationsCallback;
@@ -99,7 +96,10 @@ public abstract class AbstractUIPage ext
   public void encodeBegin(final FacesContext facesContext) throws IOException {
     if (!AjaxUtils.isAjaxRequest(facesContext)) {
       super.encodeBegin(facesContext);
-      ((AbstractUILayoutBase) getLayoutManager()).encodeBegin(facesContext);
+      final AbstractUILayoutBase layoutManager = (AbstractUILayoutBase) getLayoutManager();
+      if (layoutManager != null) {
+        layoutManager.encodeBegin(facesContext);
+      }
     }
   }
 
@@ -108,14 +108,22 @@ public abstract class AbstractUIPage ext
     if (AjaxUtils.isAjaxRequest(facesContext)) {
       new AjaxResponseRenderer().renderResponse(facesContext);
     } else {
-      ((AbstractUILayoutBase) getLayoutManager()).encodeChildren(facesContext);
+      final AbstractUILayoutBase layoutManager = (AbstractUILayoutBase) getLayoutManager();
+      if (layoutManager != null) {
+        layoutManager.encodeChildren(facesContext);
+      } else {
+        super.encodeChildren(facesContext);
+      }
     }
   }
 
   @Override
   public void encodeEnd(final FacesContext facesContext) throws IOException {
     if (!AjaxUtils.isAjaxRequest(facesContext)) {
-      ((AbstractUILayoutBase) getLayoutManager()).encodeEnd(facesContext);
+      final AbstractUILayoutBase layoutManager = (AbstractUILayoutBase) getLayoutManager();
+      if (layoutManager != null) {
+        layoutManager.encodeEnd(facesContext);
+      }
       super.encodeEnd(facesContext);
     }
     if (LOG.isTraceEnabled()) {
@@ -365,10 +373,12 @@ public abstract class AbstractUIPage ext
   }
 
   public void onComponentPopulated(final FacesContext facesContext, final UIComponent parent) {
+/*
     if (getLayoutManager() == null) {
       setLayoutManager(CreateComponentUtils.createAndInitLayout(
           facesContext, ComponentTypes.GRID_LAYOUT, RendererTypes.GRID_LAYOUT, parent));
     }
+*/
   }
 
   public List<LayoutComponent> getComponents() {

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPanel.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPanel.java?rev=1676852&r1=1676851&r2=1676852&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPanel.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPanel.java Wed Apr 29 20:32:16 2015
@@ -19,16 +19,13 @@
 
 package org.apache.myfaces.tobago.internal.component;
 
-import org.apache.myfaces.tobago.component.ComponentTypes;
 import org.apache.myfaces.tobago.component.Facets;
 import org.apache.myfaces.tobago.component.OnComponentPopulated;
-import org.apache.myfaces.tobago.component.RendererTypes;
 import org.apache.myfaces.tobago.internal.layout.LayoutUtils;
 import org.apache.myfaces.tobago.layout.LayoutComponent;
 import org.apache.myfaces.tobago.layout.LayoutContainer;
 import org.apache.myfaces.tobago.layout.LayoutManager;
 import org.apache.myfaces.tobago.util.ComponentUtils;
-import org.apache.myfaces.tobago.util.CreateComponentUtils;
 
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
@@ -42,19 +39,32 @@ public abstract class AbstractUIPanel ex
   public void encodeBegin(final FacesContext facesContext) throws IOException {
 
     super.encodeBegin(facesContext);
-    ((AbstractUILayoutBase) getLayoutManager()).encodeBegin(facesContext);
+
+    final AbstractUILayoutBase layoutManager = (AbstractUILayoutBase) getLayoutManager();
+    if (layoutManager != null) {
+      layoutManager.encodeBegin(facesContext);
+    }
   }
 
   @Override
   public void encodeChildren(final FacesContext facesContext) throws IOException {
 
-    ((AbstractUILayoutBase) getLayoutManager()).encodeChildren(facesContext);
+    final AbstractUILayoutBase layoutManager = (AbstractUILayoutBase) getLayoutManager();
+    if (layoutManager != null) {
+      layoutManager.encodeChildren(facesContext);
+    } else {
+      super.encodeChildren(facesContext);
+    }
   }
 
   @Override
   public void encodeEnd(final FacesContext facesContext) throws IOException {
 
-    ((AbstractUILayoutBase) getLayoutManager()).encodeEnd(facesContext);
+    final AbstractUILayoutBase layoutManager = (AbstractUILayoutBase) getLayoutManager();
+    if (layoutManager != null) {
+      layoutManager.encodeEnd(facesContext);
+    }
+
     super.encodeEnd(facesContext);
   }
 
@@ -84,10 +94,13 @@ public abstract class AbstractUIPanel ex
         return (LayoutManager) ComponentUtils.findChild(layoutFacet, AbstractUILayoutBase.class);
       }
     } else {
+/*
       final LayoutManager layoutManager = CreateComponentUtils.createAndInitLayout(
           FacesContext.getCurrentInstance(), ComponentTypes.GRID_LAYOUT, RendererTypes.GRID_LAYOUT, base.getParent());
       base.getFacets().put(Facets.LAYOUT, (AbstractUILayoutBase) layoutManager);
       return layoutManager;
+*/
+      return null;
     }
   }
 

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPopup.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPopup.java?rev=1676852&r1=1676851&r2=1676852&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPopup.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPopup.java Wed Apr 29 20:32:16 2015
@@ -20,20 +20,17 @@
 package org.apache.myfaces.tobago.internal.component;
 
 import org.apache.myfaces.tobago.component.Attributes;
-import org.apache.myfaces.tobago.component.ComponentTypes;
 import org.apache.myfaces.tobago.component.DeprecatedDimension;
 import org.apache.myfaces.tobago.component.Facets;
 import org.apache.myfaces.tobago.component.OnComponentCreated;
 import org.apache.myfaces.tobago.component.OnComponentPopulated;
 import org.apache.myfaces.tobago.component.Position;
-import org.apache.myfaces.tobago.component.RendererTypes;
 import org.apache.myfaces.tobago.internal.layout.LayoutUtils;
 import org.apache.myfaces.tobago.internal.util.FacesContextUtils;
 import org.apache.myfaces.tobago.layout.LayoutComponent;
 import org.apache.myfaces.tobago.layout.LayoutContainer;
 import org.apache.myfaces.tobago.layout.LayoutManager;
 import org.apache.myfaces.tobago.layout.Measure;
-import org.apache.myfaces.tobago.util.CreateComponentUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -69,11 +66,13 @@ public abstract class AbstractUIPopup ex
   }
 
   public void onComponentPopulated(final FacesContext facesContext, final UIComponent parent) {
+/*
     if (getLayoutManager() == null) {
       final AbstractUIGridLayout layoutManager = (AbstractUIGridLayout) CreateComponentUtils.createAndInitLayout(
           facesContext, ComponentTypes.GRID_LAYOUT, RendererTypes.GRID_LAYOUT, parent);
       setLayoutManager(layoutManager);
     }
+*/
   }
 
   public List<LayoutComponent> getComponents() {

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheet.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheet.java?rev=1676852&r1=1676851&r2=1676852&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheet.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheet.java Wed Apr 29 20:32:16 2015
@@ -604,16 +604,6 @@ public abstract class AbstractUISheet ex
   }
 
   public void onComponentPopulated(final FacesContext facesContext, final UIComponent parent) {
-    if (getLayoutManager() instanceof AbstractUIGridLayout) {
-      // ugly, but it seems that some old pages have this problem
-      LOG.warn("Found a GridLayout as layout facet in sheet. Will be ignored! Please remove it."
-          + " The id of the sheet is: '" + getClientId(facesContext) + "'");
-      getFacets().remove(Facets.LAYOUT);
-    }
-    if (getLayoutManager() == null) {
-      setLayoutManager(CreateComponentUtils.createAndInitLayout(
-          facesContext, ComponentTypes.SHEET_LAYOUT, RendererTypes.SHEET_LAYOUT, parent));
-    }
   }
 
   public LayoutManager getLayoutManager() {

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheetLayout.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheetLayout.java?rev=1676852&r1=1676851&r2=1676852&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheetLayout.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheetLayout.java Wed Apr 29 20:32:16 2015
@@ -25,7 +25,6 @@ import org.apache.myfaces.tobago.interna
 import org.apache.myfaces.tobago.internal.util.StringUtils;
 import org.apache.myfaces.tobago.layout.AutoLayoutToken;
 import org.apache.myfaces.tobago.layout.LayoutComponent;
-import org.apache.myfaces.tobago.layout.LayoutContainer;
 import org.apache.myfaces.tobago.layout.LayoutManager;
 import org.apache.myfaces.tobago.layout.LayoutToken;
 import org.apache.myfaces.tobago.layout.LayoutTokens;
@@ -54,6 +53,7 @@ public abstract class AbstractUISheetLay
   private boolean verticalAuto;
 */
 
+/*
   public void init() {
 
     layoutHeader();
@@ -65,7 +65,6 @@ public abstract class AbstractUISheetLay
     }
   }
 
-/*
   public void fixRelativeInsideAuto(final Orientation orientation, final boolean auto) {
 
     if (orientation == Orientation.HORIZONTAL) {

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITabGroup.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITabGroup.java?rev=1676852&r1=1676851&r2=1676852&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITabGroup.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITabGroup.java Wed Apr 29 20:32:16 2015
@@ -21,10 +21,8 @@ package org.apache.myfaces.tobago.intern
 
 import org.apache.myfaces.tobago.compat.FacesUtilsEL;
 import org.apache.myfaces.tobago.component.Attributes;
-import org.apache.myfaces.tobago.component.ComponentTypes;
 import org.apache.myfaces.tobago.component.Facets;
 import org.apache.myfaces.tobago.component.OnComponentPopulated;
-import org.apache.myfaces.tobago.component.RendererTypes;
 import org.apache.myfaces.tobago.component.SupportsRenderedPartially;
 import org.apache.myfaces.tobago.component.UITab;
 import org.apache.myfaces.tobago.event.TabChangeEvent;
@@ -34,7 +32,6 @@ import org.apache.myfaces.tobago.interna
 import org.apache.myfaces.tobago.layout.LayoutComponent;
 import org.apache.myfaces.tobago.layout.LayoutContainer;
 import org.apache.myfaces.tobago.layout.LayoutManager;
-import org.apache.myfaces.tobago.util.CreateComponentUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -323,10 +320,7 @@ public abstract class AbstractUITabGroup
   }
 
   public void onComponentPopulated(final FacesContext facesContext, final UIComponent parent) {
-    if (getLayoutManager() == null) {
-      setLayoutManager(CreateComponentUtils.createAndInitLayout(
-          facesContext, ComponentTypes.TAB_GROUP_LAYOUT, RendererTypes.TAB_GROUP_LAYOUT, parent));
-    }
+    super.onComponentPopulated(facesContext, parent);
   }
 
   public LayoutManager getLayoutManager() {

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITabGroupLayout.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITabGroupLayout.java?rev=1676852&r1=1676851&r2=1676852&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITabGroupLayout.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITabGroupLayout.java Wed Apr 29 20:32:16 2015
@@ -19,8 +19,6 @@
 
 package org.apache.myfaces.tobago.internal.component;
 
-import org.apache.myfaces.tobago.layout.LayoutComponent;
-import org.apache.myfaces.tobago.layout.LayoutContainer;
 import org.apache.myfaces.tobago.layout.LayoutManager;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -32,6 +30,7 @@ public abstract class AbstractUITabGroup
   private boolean horizontalAuto;
   private boolean verticalAuto;
 
+/*
   public void init() {
     for (final LayoutComponent component : getLayoutContainer().getComponents()) {
       if (component instanceof LayoutContainer && component.isRendered()) {
@@ -40,7 +39,6 @@ public abstract class AbstractUITabGroup
     }
   }
 
-/*
   public void fixRelativeInsideAuto(final Orientation orientation, final boolean auto) {
 
     if (orientation == Orientation.HORIZONTAL) {

Added: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/FooterTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/FooterTagDeclaration.java?rev=1676852&view=auto
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/FooterTagDeclaration.java (added)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/FooterTagDeclaration.java Wed Apr 29 20:32:16 2015
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ */
+
+package org.apache.myfaces.tobago.internal.taglib.component;
+
+import org.apache.myfaces.tobago.apt.annotation.Tag;
+import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
+import org.apache.myfaces.tobago.component.RendererTypes;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasCurrentMarkup;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasIdBindingAndRendered;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasMarkup;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasTip;
+
+import javax.faces.component.UIPanel;
+
+/**
+ * Defines a footer of its parent (like page, box, ...)
+ */
+@Tag(name = "footer")
+@UIComponentTag(
+    uiComponent = "org.apache.myfaces.tobago.component.UIFooter",
+    uiComponentBaseClass = "javax.faces.component.UIPanel",
+    componentFamily = UIPanel.COMPONENT_FAMILY,
+    rendererType = RendererTypes.FOOTER,
+    allowedChildComponenents = "ALL")
+public interface FooterTagDeclaration extends HasIdBindingAndRendered, HasTip, HasMarkup, HasCurrentMarkup {
+}

Added: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/HeaderTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/HeaderTagDeclaration.java?rev=1676852&view=auto
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/HeaderTagDeclaration.java (added)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/HeaderTagDeclaration.java Wed Apr 29 20:32:16 2015
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ */
+
+package org.apache.myfaces.tobago.internal.taglib.component;
+
+import org.apache.myfaces.tobago.apt.annotation.Tag;
+import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
+import org.apache.myfaces.tobago.component.RendererTypes;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasCurrentMarkup;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasIdBindingAndRendered;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasMarkup;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasTip;
+
+import javax.faces.component.UIPanel;
+
+/**
+ * Defines a header of its parent (like page, box, ...)
+ */
+@Tag(name = "header")
+@UIComponentTag(
+    uiComponent = "org.apache.myfaces.tobago.component.UIHeader",
+    uiComponentBaseClass = "javax.faces.component.UIPanel",
+    componentFamily = UIPanel.COMPONENT_FAMILY,
+    rendererType = RendererTypes.HEADER,
+    allowedChildComponenents = "ALL")
+public interface HeaderTagDeclaration extends HasIdBindingAndRendered, HasTip, HasMarkup, HasCurrentMarkup {
+}

Added: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/NavTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/NavTagDeclaration.java?rev=1676852&view=auto
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/NavTagDeclaration.java (added)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/NavTagDeclaration.java Wed Apr 29 20:32:16 2015
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ */
+
+package org.apache.myfaces.tobago.internal.taglib.component;
+
+import org.apache.myfaces.tobago.apt.annotation.Tag;
+import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
+import org.apache.myfaces.tobago.component.RendererTypes;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasCurrentMarkup;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasIdBindingAndRendered;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasMarkup;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasTip;
+
+import javax.faces.component.UIPanel;
+
+/**
+ * Defines a navigation element
+ */
+@Tag(name = "nav")
+@UIComponentTag(
+    uiComponent = "org.apache.myfaces.tobago.component.UINav",
+    uiComponentBaseClass = "javax.faces.component.UIPanel",
+    componentFamily = UIPanel.COMPONENT_FAMILY,
+    rendererType = RendererTypes.NAV,
+    allowedChildComponenents = "ALL")
+public interface NavTagDeclaration extends HasIdBindingAndRendered, HasTip, HasMarkup, HasCurrentMarkup {
+}

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/LayoutManager.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/LayoutManager.java?rev=1676852&r1=1676851&r2=1676852&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/LayoutManager.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/LayoutManager.java Wed Apr 29 20:32:16 2015
@@ -23,9 +23,9 @@ import org.apache.myfaces.tobago.config.
 
 public interface LayoutManager extends Configurable {
 
+/*
   void init();
 
-/*
   void fixRelativeInsideAuto(Orientation orientation, boolean auto);
 
   void preProcessing(Orientation orientation);

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/DataAttributes.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/DataAttributes.java?rev=1676852&r1=1676851&r2=1676852&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/DataAttributes.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/DataAttributes.java Wed Apr 29 20:32:16 2015
@@ -233,6 +233,8 @@ public final class DataAttributes {
 
   public static final String TO_PAGE = "data-tobago-to-page";
 
+  public static final String TOGGLE = "data-toggle";
+
   public static final String TRANSITION = "data-tobago-transition";
 
   /**

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlElements.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlElements.java?rev=1676852&r1=1676851&r2=1676852&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlElements.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlElements.java Wed Apr 29 20:32:16 2015
@@ -32,6 +32,7 @@ public final class HtmlElements {
   public static final String COLGROUP = "colgroup";
   public static final String DIV = "div";
   public static final String FIELDSET = "fieldset";
+  public static final String FOOTER = "footer";
   public static final String FORM = "form";
   public static final String H1 = "h1";
   public static final String H2 = "h2";
@@ -40,6 +41,7 @@ public final class HtmlElements {
   public static final String H5 = "h5";
   public static final String H6 = "h6";
   public static final String HEAD = "head";
+  public static final String HEADER = "header";
   public static final String HR = "hr";
   public static final String HTML = "html";
   public static final String IFRAME = "iframe";

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRoleValues.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRoleValues.java?rev=1676852&r1=1676851&r2=1676852&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRoleValues.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRoleValues.java Wed Apr 29 20:32:16 2015
@@ -21,6 +21,7 @@ package org.apache.myfaces.tobago.render
 
 public enum HtmlRoleValues {
 
+  MENU("menu"),
   NAVIGATION("navigation"),
   PRESENTATION("presentation"),
   TABLIST("tablist");

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/util/EncodeAjaxCallback.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/util/EncodeAjaxCallback.java?rev=1676852&r1=1676851&r2=1676852&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/util/EncodeAjaxCallback.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/util/EncodeAjaxCallback.java Wed Apr 29 20:32:16 2015
@@ -22,9 +22,6 @@ package org.apache.myfaces.tobago.util;
 
 import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.component.Facets;
-import org.apache.myfaces.tobago.internal.layout.LayoutContext;
-import org.apache.myfaces.tobago.layout.LayoutContainer;
-import org.apache.myfaces.tobago.layout.Measure;
 import org.apache.myfaces.tobago.renderkit.util.EncodeUtils;
 
 import javax.faces.FacesException;
@@ -48,18 +45,6 @@ public class EncodeAjaxCallback implemen
          }
       }
       EncodeUtils.prepareRendererAll(facesContext, component);
-      if (component instanceof LayoutContainer) {
-        final LayoutContainer layoutContainer = (LayoutContainer) component;
-        final Measure width = layoutContainer.getCurrentWidth();
-        final Measure height = layoutContainer.getCurrentHeight();
-        final Measure oldWidth = layoutContainer.getWidth();
-        final Measure oldHeight = layoutContainer.getHeight();
-        layoutContainer.setWidth(width);
-        layoutContainer.setHeight(height);
-        new LayoutContext(layoutContainer).layout();
-        layoutContainer.setWidth(oldWidth);
-        layoutContainer.setHeight(oldHeight);
-      }
       component.encodeAll(facesContext);
     } catch (final IOException e) {
       throw new FacesException(e);

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/renderkit/html/DataAttributesUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/renderkit/html/DataAttributesUnitTest.java?rev=1676852&r1=1676851&r2=1676852&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/renderkit/html/DataAttributesUnitTest.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/renderkit/html/DataAttributesUnitTest.java Wed Apr 29 20:32:16 2015
@@ -35,9 +35,12 @@ public class DataAttributesUnitTest {
         continue;
       }
       final String value = (String) field.get(null);
-      Assert.assertTrue("Regexp check: value='" + value + "'", value.matches("data-tobago(-[a-z0-9]+)*-[a-z0-9]+"));
+      Assert.assertTrue("Regexp check: value='" + value + "'", value.matches("data(-tobago)?(-[a-z0-9]+)*-[a-z0-9]+"));
 
-      final String extension = value.substring("data-tobago-".length());
+      final String extension
+          = value.startsWith("data-tobago-")
+          ? value.substring("data-tobago-".length())
+          : value.substring("data-".length());
       final String name = field.getName();
       Assert.assertEquals(name, extension.toUpperCase().replaceAll("-", "_"));
     }

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/layout/overview.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/layout/overview.xhtml?rev=1676852&r1=1676851&r2=1676852&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/layout/overview.xhtml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/layout/overview.xhtml Wed Apr 29 20:32:16 2015
@@ -36,32 +36,42 @@
       </f:facet>
 -->
 
-      <f:facet name="menuBar">
+      <tc:header>
         <ui:include src="/menu.xhtml"/>
-      </f:facet>
+      </tc:header>
 
       <f:facet name="layout">
-        <tc:gridLayout border="0" columns="*;4*" margin="10px" rows="100px;auto;*;auto"/>
+        <tc:flexLayout rows="100px;*" />
       </f:facet>
 
       <tc:panel>
-        <tc:gridLayoutConstraint columnSpan="2"/>
         <ui:include src="/header.xhtml"/>
       </tc:panel>
 
       <tc:panel>
-        <tc:gridLayoutConstraint rowSpan="3"/>
-      <ui:include src="/navigation.xhtml"/>
-      </tc:panel>
+        <f:facet name="layout">
+          <tc:flexLayout columns="*;4*" />
+        </f:facet>
 
-      <tc:messages/>
+        <tc:panel>
+          <ui:include src="/navigation.xhtml"/>
+        </tc:panel>
 
-      <tc:box label="#{title}" id="content">
-        <ui:insert/>
-      </tc:box>
+        <tc:panel>
+          <f:facet name="layout">
+            <tc:flexLayout rows="auto;*;auto" />
+          </f:facet>
+
+          <tc:messages/>
+
+          <tc:box label="#{title}" id="content">
+            <ui:insert/>
+          </tc:box>
+
+          <ui:include src="/footer.xhtml"/>
+
+        </tc:panel>
 
-      <tc:panel>
-        <ui:include src="/footer.xhtml"/>
       </tc:panel>
 
     </tc:page>

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/menu.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/menu.xhtml?rev=1676852&r1=1676851&r2=1676852&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/menu.xhtml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/menu.xhtml Wed Apr 29 20:32:16 2015
@@ -17,34 +17,49 @@
  * limitations under the License.
 -->
 
-<tc:menuBar
+<tc:nav
     xmlns:f="http://java.sun.com/jsf/core"
     xmlns:tc="http://myfaces.apache.org/tobago/component"
     xmlns:tx="http://myfaces.apache.org/tobago/extension">
   <tc:form>
-    <tc:menu label="#{overviewBundle.menu_config}">
-      <tc:menu label="Hier sind die themes">
-        <tx:menuRadio action="#{clientConfigController.submit}" value="#{clientConfigController.theme}">
-          <f:selectItems value="#{clientConfigController.themeItems}"/>
-        </tx:menuRadio>
-      </tc:menu>
-      <tc:menu label="#{overviewBundle.menu_locale}">
-        <tx:menuRadio action="#{clientConfigController.submit}" value="#{clientConfigController.locale}">
-          <f:selectItems value="#{clientConfigController.localeItems}"/>
-        </tx:menuRadio>
-      </tc:menu>
-      <tc:menuCommand action="#{demo.resetSession}" label="Reset"/>
-    </tc:menu>
+  <tc:command label="#{overviewBundle.menu_config}" omit="true">
+    <tc:command label="Hier sind die themes">
+      <tc:command action="#{clientConfigController.submit}">
+        <tc:selectOneRadio value="#{clientConfigController.theme}">
+          <tc:selectItems value="#{clientConfigController.themeItems}"/>
+        </tc:selectOneRadio>
+      </tc:command>
+    </tc:command>
+    <tc:command label="#{overviewBundle.menu_locale}">
+      <tc:command action="#{clientConfigController.submit}">
+        <tc:selectOneRadio value="#{clientConfigController.locale}">
+          <tc:selectItems value="#{clientConfigController.localeItems}"/>
+        </tc:selectOneRadio>
+      </tc:command>
+    </tc:command>
+    <tc:command action="#{demo.resetSession}" label="Reset"/>
+  </tc:command>
 
-    <tc:menu label="#{overviewBundle.menu_help}">
-      <tc:menuCommand label="#{overviewBundle.menu_about}" omit="true">
-        <tc:dataAttribute name="alert-text"
-                          value="#{overviewBundle.pageTitle} - #{info.version} - #{overviewBundle.tobago_url}"/>
-      </tc:menuCommand>
-      <tc:menuCommand link="http://myfaces.apache.org/tobago" label="Tobago in the Web"/>
-      <tc:menuCommand action="server-info" immediate="true"
-                      label="Server Info"
-                      disabled="#{! info.enabled}"/>
-    </tc:menu>
+  <tc:command label="#{overviewBundle.menu_help}" omit="true">
+    <tc:command label="#{overviewBundle.menu_about}" omit="true">
+      <tc:dataAttribute name="alert-text"
+                        value="#{overviewBundle.pageTitle} - #{info.version} - #{overviewBundle.tobago_url}"/>
+    </tc:command>
+    <tc:command link="http://myfaces.apache.org/tobago" label="Tobago in the Web"/>
+    <tc:command action="server-info" immediate="true" label="Server Info" disabled="#{! info.enabled}"/>
+    <tc:command label="Sub-Menu" omit="true">
+      <tc:command label="Sub 1" omit="true"/>
+      <tc:command label="Sub 2" omit="true"/>
+      <tc:command label="Sub 3" omit="true"/>
+      <tc:command action="doit" label="Sub 4 ich kann auch selber was" omit="true">
+        <tc:command label="Sub 4 1" omit="true"/>
+        <tc:command label="Sub 4 2" omit="true"/>
+      </tc:command>
+      <tc:command label="Sub 5" omit="true">
+        <tc:command label="Sub 5 1" omit="true"/>
+        <tc:command label="Sub 5 2" omit="true"/>
+      </tc:command>
+    </tc:command>
+  </tc:command>
   </tc:form>
-</tc:menuBar>
+</tc:nav>

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/test/flexLayout/flexLayout-horizontal.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/test/flexLayout/flexLayout-horizontal.xhtml?rev=1676852&r1=1676851&r2=1676852&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/test/flexLayout/flexLayout-horizontal.xhtml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/test/flexLayout/flexLayout-horizontal.xhtml Wed Apr 29 20:32:16 2015
@@ -24,13 +24,13 @@
 
   <tc:page id="page">
     <f:facet name="layout">
-      <tc:flexLayout columns="*;auto;2*;100px"/>
+      <tc:flexLayout columns="*;auto;100px;2*"/>
     </f:facet>
 
-    <tc:textarea value="Left"/>
+    <tc:textarea value="Left 1*"/>
     <tc:image value="pidgeon-point.jpg"/>
-    <tc:textarea value="Right"/>
-    <tc:textarea value="222"/>
+    <tc:textarea value="100px"/>
+    <tc:textarea value="Right 2*"/>
 
   </tc:page>
 </f:view>

Copied: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/test/flexLayout/flexLayout-vertical.xhtml (from r1673812, myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/test/flexLayout/flexLayout-horizontal.xhtml)
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/test/flexLayout/flexLayout-vertical.xhtml?p2=myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/test/flexLayout/flexLayout-vertical.xhtml&p1=myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/test/flexLayout/flexLayout-horizontal.xhtml&r1=1673812&r2=1676852&rev=1676852&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/test/flexLayout/flexLayout-horizontal.xhtml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/test/flexLayout/flexLayout-vertical.xhtml Wed Apr 29 20:32:16 2015
@@ -22,15 +22,16 @@
     xmlns:ui="http://java.sun.com/jsf/facelets"
     xmlns:f="http://java.sun.com/jsf/core">
 
-  <tc:page id="page">
+  <tc:page id="page" >
+    <tc:gridLayoutConstraint height="500px"/>
     <f:facet name="layout">
-      <tc:flexLayout columns="*;auto;2*;100px"/>
+      <tc:flexLayout rows="*;auto;100px;2*"/>
     </f:facet>
 
-    <tc:textarea value="Left"/>
+    <tc:textarea value="Top 1*"/>
     <tc:image value="pidgeon-point.jpg"/>
-    <tc:textarea value="Right"/>
-    <tc:textarea value="222"/>
+    <tc:textarea value="100px"/>
+    <tc:textarea value="Bottom 2*"/>
 
   </tc:page>
 </f:view>

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/BootstrapClass.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/BootstrapClass.java?rev=1676852&r1=1676851&r2=1676852&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/BootstrapClass.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/BootstrapClass.java Wed Apr 29 20:32:16 2015
@@ -40,6 +40,7 @@ public enum BootstrapClass implements Cs
   DISABLED("disabled"),
   DROPDOWN("dropdown"),
   DROPDOWN_MENU("dropdown-menu"),
+  DROPDOWN_TOGGLE("dropdown-toggle"),
   FADE("fade"),
   FORM_CONTROL_STATIC("form-control-static"),
   FORM_GROUP("form-group"),
@@ -60,6 +61,7 @@ public enum BootstrapClass implements Cs
   NAVBAR_HEADER("navbar-header"),
   NAVBAR_INVERSE("navbar-inverse"),
   NAVBAR_NAV("navbar-nav"),
+  NAVBAR_TEXT("navbar-text"),
   NAVBAR_TOGGLE("navbar-toggle"),
   PAGE_HEADER("page-header"),
   PAGINATION("pagination"),

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandRenderer.java?rev=1676852&r1=1676851&r2=1676852&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandRenderer.java Wed Apr 29 20:32:16 2015
@@ -19,7 +19,172 @@
 
 package org.apache.myfaces.tobago.renderkit.html.standard.standard.tag;
 
+import org.apache.myfaces.tobago.context.ResourceManagerUtils;
+import org.apache.myfaces.tobago.internal.component.AbstractUICommand;
+import org.apache.myfaces.tobago.internal.component.AbstractUILink;
+import org.apache.myfaces.tobago.internal.util.AccessKeyLogger;
 import org.apache.myfaces.tobago.renderkit.CommandRendererBase;
+import org.apache.myfaces.tobago.renderkit.LabelWithAccessKey;
+import org.apache.myfaces.tobago.renderkit.css.Classes;
+import org.apache.myfaces.tobago.renderkit.css.Style;
+import org.apache.myfaces.tobago.renderkit.html.BootstrapClass;
+import org.apache.myfaces.tobago.renderkit.html.Command;
+import org.apache.myfaces.tobago.renderkit.html.CommandMap;
+import org.apache.myfaces.tobago.renderkit.html.DataAttributes;
+import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
+import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
+import org.apache.myfaces.tobago.renderkit.html.HtmlRoleValues;
+import org.apache.myfaces.tobago.renderkit.html.JsonUtils;
+import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils;
+import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import java.io.IOException;
 
 public class CommandRenderer extends CommandRendererBase {
+
+/*
+  @Override
+  public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {
+    final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+
+  }
+
+  @Override
+  public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
+    final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+  }
+*/
+
+  public void encodeBegin(final FacesContext facesContext, final UIComponent component) throws IOException {
+
+    final AbstractUICommand link = (AbstractUICommand) component;
+    final String clientId = link.getClientId(facesContext);
+    final boolean disabled = link.isDisabled();
+    final LabelWithAccessKey label = new LabelWithAccessKey(link);
+
+    final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+
+    if (disabled) {
+      writer.startElement(HtmlElements.SPAN, link);
+    } else {
+      writer.startElement(HtmlElements.A, link);
+
+      final CommandMap map = new CommandMap(new Command(facesContext, link));
+      writer.writeAttribute(DataAttributes.COMMANDS, JsonUtils.encode(map), true);
+
+      writer.writeAttribute(HtmlAttributes.HREF, "#", false);
+
+      if (label.getAccessKey() != null) {
+        writer.writeAttribute(HtmlAttributes.ACCESSKEY, Character.toString(label.getAccessKey()), false);
+        AccessKeyLogger.addAccessKey(facesContext, label.getAccessKey(), clientId);
+      }
+
+      final Integer tabIndex = link instanceof AbstractUILink ? ((AbstractUILink) link).getTabIndex() : null;
+      if (tabIndex != null) {
+        writer.writeAttribute(HtmlAttributes.TABINDEX, tabIndex);
+      }
+    }
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, link);
+    final Style style = new Style(facesContext, link);
+    writer.writeStyleAttribute(style);
+    if (link.isParentOfCommands()) {
+      writer.writeClassAttribute(BootstrapClass.DROPDOWN_TOGGLE); // todo: CSS classes
+      writer.writeAttribute(DataAttributes.TOGGLE, "dropdown", false);
+    } else {
+      writer.writeClassAttribute(Classes.create(link));
+    }
+    writer.writeIdAttribute(clientId);
+    writer.writeNameAttribute(clientId);
+    final String title = HtmlRendererUtils.getTitleFromTipAndMessages(facesContext, link);
+    if (title != null) {
+      writer.writeAttribute(HtmlAttributes.TITLE, title, true);
+    }
+    writer.flush();
+
+//  image
+    String image = link instanceof AbstractUILink ? ((AbstractUILink) link).getImage() : null;
+    if (image != null) {
+      if (ResourceManagerUtils.isAbsoluteResource(image)) {
+        // absolute Path to image : nothing to do
+      } else {
+        image = getImageWithPath(facesContext, image, disabled);
+      }
+      writer.startElement(HtmlElements.IMG, link);
+      writer.writeClassAttribute(Classes.create(link, "image"));
+      writer.writeAttribute(HtmlAttributes.SRC, image, true);
+      writer.writeAttribute(HtmlAttributes.BORDER, 0); // TODO: is border=0 setting via style possible?
+      final String tip = link.getTip();
+      writer.writeAttribute(HtmlAttributes.ALT, tip != null ? tip : "", true);
+      if (tip != null) {
+        writer.writeAttribute(HtmlAttributes.TITLE, tip, true);
+      }
+      writer.endElement(HtmlElements.IMG);
+    }
+
+//  label
+    if (label.getLabel() != null) {
+      if (image != null) {
+        writer.write(" "); // separator: e.g. &nbsp;
+      }
+      HtmlRendererUtils.writeLabelWithAccessKey(writer, label);
+    }
+
+    if (disabled) {
+      writer.endElement(HtmlElements.SPAN);
+    } else {
+      writer.endElement(HtmlElements.A);
+    }
+
+    if (link.isParentOfCommands()) {
+      writer.startElement(HtmlElements.UL, null);
+      writer.writeClassAttribute(BootstrapClass.DROPDOWN_MENU);
+      writer.writeAttribute(HtmlAttributes.ROLE, HtmlRoleValues.MENU.toString(), false);
+    }
+  }
+
+  @Override
+  public boolean getRendersChildren() {
+    return true;
+  }
+
+  @Override
+  public void encodeChildren(final FacesContext facesContext, final UIComponent component) throws IOException {
+
+    final AbstractUICommand link = (AbstractUICommand) component;
+
+    if (link.isParentOfCommands()) {
+      final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+
+      for (UIComponent child : component.getChildren()) {
+        if (child.isRendered()) {
+          writer.startElement(HtmlElements.LI, null);
+          if (child instanceof AbstractUICommand) {
+            AbstractUICommand command = (AbstractUICommand) child;
+            if (command.isParentOfCommands()) {
+              writer.writeClassAttribute("dropdown-submenu");  // fixme: this name comes not from bootstrap, using prefix?
+            }
+          }
+          child.encodeAll(facesContext);
+          writer.endElement(HtmlElements.LI);
+        }
+      }
+    } else {
+      super.encodeChildren(facesContext, component);
+    }
+
+  }
+
+  public void encodeEnd(final FacesContext facesContext, final UIComponent component) throws IOException {
+
+    final AbstractUICommand link = (AbstractUICommand) component;
+
+    if (link.isParentOfCommands()) {
+      final ResponseWriter writer = facesContext.getResponseWriter();
+      writer.endElement(HtmlElements.UL);
+    }
+
+  }
 }

Added: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FooterRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FooterRenderer.java?rev=1676852&view=auto
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FooterRenderer.java (added)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FooterRenderer.java Wed Apr 29 20:32:16 2015
@@ -0,0 +1,45 @@
+/*
+ * 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.
+ */
+
+package org.apache.myfaces.tobago.renderkit.html.standard.standard.tag;
+
+import org.apache.myfaces.tobago.renderkit.RendererBase;
+import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
+import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils;
+import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import java.io.IOException;
+
+public class FooterRenderer extends RendererBase {
+
+  @Override
+  public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {
+    final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+    writer.startElement(HtmlElements.FOOTER, component);
+    writer.writeIdAttribute(component.getClientId(facesContext));
+  }
+
+  @Override
+  public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
+    final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+    writer.endElement(HtmlElements.FOOTER);
+  }
+}

Added: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/HeaderRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/HeaderRenderer.java?rev=1676852&view=auto
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/HeaderRenderer.java (added)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/HeaderRenderer.java Wed Apr 29 20:32:16 2015
@@ -0,0 +1,48 @@
+/*
+ * 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.
+ */
+
+package org.apache.myfaces.tobago.renderkit.html.standard.standard.tag;
+
+import org.apache.myfaces.tobago.renderkit.RendererBase;
+import org.apache.myfaces.tobago.renderkit.html.BootstrapClass;
+import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
+import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils;
+import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import java.io.IOException;
+
+public class HeaderRenderer extends RendererBase {
+
+  @Override
+  public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {
+    final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+    writer.startElement(HtmlElements.HEADER, component);
+    writer.writeIdAttribute(component.getClientId(facesContext));
+    writer.writeClassAttribute(BootstrapClass.NAVBAR, BootstrapClass.NAVBAR_INVERSE, BootstrapClass.NAVBAR_FIXED_TOP);
+// XXX    writer.writeClassAttribute(BootstrapClass.NAVBAR, BootstrapClass.NAVBAR_DEFAULT, BootstrapClass.NAVBAR_FIXED_TOP);
+  }
+
+  @Override
+  public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
+    final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+    writer.endElement(HtmlElements.HEADER);
+  }
+}

Added: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/NavRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/NavRenderer.java?rev=1676852&view=auto
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/NavRenderer.java (added)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/NavRenderer.java Wed Apr 29 20:32:16 2015
@@ -0,0 +1,86 @@
+/*
+ * 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.
+ */
+
+package org.apache.myfaces.tobago.renderkit.html.standard.standard.tag;
+
+import org.apache.myfaces.tobago.internal.component.AbstractUIForm;
+import org.apache.myfaces.tobago.renderkit.RendererBase;
+import org.apache.myfaces.tobago.renderkit.html.BootstrapClass;
+import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
+import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
+import org.apache.myfaces.tobago.renderkit.html.HtmlRoleValues;
+import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils;
+import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import java.io.IOException;
+
+public class NavRenderer extends RendererBase {
+
+  @Override
+  public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {
+    final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+
+    writer.startElement(HtmlElements.NAV, null);
+    writer.writeIdAttribute(component.getClientId(facesContext));
+    writer.writeAttribute(HtmlAttributes.ROLE, HtmlRoleValues.NAVIGATION.toString(), false);
+
+    writer.startElement(HtmlElements.DIV, null);
+    writer.writeClassAttribute(BootstrapClass.CONTAINER_FLUID);
+
+    writer.startElement(HtmlElements.DIV, null);
+    writer.writeClassAttribute(BootstrapClass.COLLAPSE, BootstrapClass.NAVBAR_COLLAPSE);
+// XXX   writer.writeClassAttribute(BootstrapClass.COLLAPSE, BootstrapClass.NAVBAR_COLLAPSE, BootstrapClass.NAVBAR_TEXT);
+
+    writer.startElement(HtmlElements.UL, null);
+    writer.writeClassAttribute(BootstrapClass.NAV, BootstrapClass.NAVBAR_NAV);
+  }
+
+  @Override
+  public boolean getRendersChildren() {
+    return true;
+  }
+
+  @Override
+  public void encodeChildren(FacesContext facesContext, UIComponent component) throws IOException {
+    final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+
+    for (UIComponent child : component.getChildren()) {
+      if (child.isRendered()) {
+        if (child instanceof AbstractUIForm) { // XXX hack! TBD: How to walk through the children, or do that in JS?
+          encodeChildren(facesContext, child);
+        } else {
+          writer.startElement(HtmlElements.LI, null);
+          child.encodeAll(facesContext);
+          writer.endElement(HtmlElements.LI);
+        }
+      }
+    }
+  }
+
+  @Override
+  public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
+    final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+    writer.endElement(HtmlElements.UL);
+    writer.endElement(HtmlElements.DIV);
+    writer.endElement(HtmlElements.DIV);
+    writer.endElement(HtmlElements.NAV);
+  }
+}

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PageRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PageRenderer.java?rev=1676852&r1=1676851&r2=1676852&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PageRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PageRenderer.java Wed Apr 29 20:32:16 2015
@@ -34,7 +34,6 @@ import org.apache.myfaces.tobago.context
 import org.apache.myfaces.tobago.context.Theme;
 import org.apache.myfaces.tobago.internal.ajax.AjaxInternalUtils;
 import org.apache.myfaces.tobago.internal.component.AbstractUIPage;
-import org.apache.myfaces.tobago.internal.layout.LayoutContext;
 import org.apache.myfaces.tobago.internal.util.AccessKeyLogger;
 import org.apache.myfaces.tobago.internal.util.FacesContextUtils;
 import org.apache.myfaces.tobago.internal.util.MimeTypeUtils;
@@ -44,13 +43,11 @@ import org.apache.myfaces.tobago.layout.
 import org.apache.myfaces.tobago.portlet.PortletUtils;
 import org.apache.myfaces.tobago.renderkit.PageRendererBase;
 import org.apache.myfaces.tobago.renderkit.css.Classes;
-import org.apache.myfaces.tobago.renderkit.css.Style;
 import org.apache.myfaces.tobago.renderkit.html.BootstrapClass;
 import org.apache.myfaces.tobago.renderkit.html.DataAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
 import org.apache.myfaces.tobago.renderkit.html.HtmlInputTypes;
-import org.apache.myfaces.tobago.renderkit.html.HtmlRoleValues;
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils;
 import org.apache.myfaces.tobago.renderkit.util.EncodeUtils;
 import org.apache.myfaces.tobago.renderkit.util.RenderUtils;
@@ -112,8 +109,6 @@ public class PageRenderer extends PageRe
     // invoke prepareRender
     EncodeUtils.prepareRendererAll(facesContext, page);
 
-    final LayoutContext layoutContext = new LayoutContext(page);
-    layoutContext.layout();
     if (FacesContextUtils.getFocusId(facesContext) == null && !StringUtils.isBlank(page.getFocusId())) {
       FacesContextUtils.setFocusId(facesContext, page.getFocusId());
     }
@@ -355,6 +350,7 @@ public class PageRenderer extends PageRe
 
 //    page.encodeLayoutBegin(facesContext);
 
+/*
     writer.startElement(HtmlElements.DIV, page);
     if (portlet) {
       writer.writeClassAttribute(Classes.create(page, "content", Markup.PORTLET));
@@ -370,10 +366,12 @@ public class PageRenderer extends PageRe
     style.setHeight(page.getCurrentHeight().subtract(border));
     style.setTop(border);
     writer.writeStyleAttribute(style);
+*/
   }
 
   protected void encodePageMenu(FacesContext facesContext, UIPage page) throws IOException {
 
+/*
     final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
 
     writer.startElement(HtmlElements.NAV, null);
@@ -396,6 +394,7 @@ public class PageRenderer extends PageRe
     writer.endElement(HtmlElements.DIV);
 
     writer.endElement(HtmlElements.NAV);
+*/
   }
 
 
@@ -436,7 +435,9 @@ public class PageRenderer extends PageRe
     final UIPage page = (UIPage) component;
     final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
 
+/*
     writer.endElement(HtmlElements.DIV);
+*/
 
     // write popup components
     // beware of ConcurrentModificationException in cascading popups!

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PopupRendererOld.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PopupRendererOld.java?rev=1676852&r1=1676851&r2=1676852&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PopupRendererOld.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PopupRendererOld.java Wed Apr 29 20:32:16 2015
@@ -22,7 +22,6 @@ package org.apache.myfaces.tobago.render
 import org.apache.myfaces.tobago.component.UIPopup;
 import org.apache.myfaces.tobago.context.Markup;
 import org.apache.myfaces.tobago.internal.component.AbstractUIPage;
-import org.apache.myfaces.tobago.internal.layout.LayoutContext;
 import org.apache.myfaces.tobago.internal.util.FacesContextUtils;
 import org.apache.myfaces.tobago.layout.Measure;
 import org.apache.myfaces.tobago.renderkit.LayoutComponentRendererBase;
@@ -68,9 +67,6 @@ public class PopupRendererOld extends La
     final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
     final UIPopup popup = (UIPopup) component;
 
-    final LayoutContext layoutContext = new LayoutContext(popup);
-    layoutContext.layout();
-
     // XXX fixing invisible popups
     if (popup.getCurrentWidth() == null || popup.getCurrentWidth().equals(Measure.ZERO)) {
       LOG.warn("Undefined width of popup with id='" + popup.getClientId(facesContext) + "'");

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-layout.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-layout.js?rev=1676852&r1=1676851&r2=1676852&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-layout.js (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-layout.js Wed Apr 29 20:32:16 2015
@@ -133,6 +133,10 @@ function setLength2(banks, i, css, lengt
 }
 
 function layoutFlex(container, horizontal) {
+
+  // todo: modernizr
+  // if (!Modernizr.flexbox && !Modernizr.flexboxtweener) ... do other
+
   var cells;
   var banks;
   var tokens;
@@ -157,7 +161,13 @@ function layoutFlex(container, horizonta
         case "number":
           // a relative value
           // todo: check for "any other" (non-layout) elements
-          container.children().eq(i).css("flex", tokens[i] + " 0 0"); // todo: modernizr
+          var flex = "flex";
+          if (Tobago.browser.isMsie678910) { // todo: modernizr
+            flex = "-ms-flex";
+          }
+          // using "0px" and not "0", because IE11 needs the "px"
+          //container.children().eq(i).css(Modernizr.prefixed("flex"), tokens[i] + " 0 0px");  // todo: modernizr
+          container.children().eq(i).css(flex, tokens[i] + " 0 0px");
           break;
         case "string":
           // a string, currently only "auto" is supported

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css?rev=1676852&r1=1676851&r2=1676852&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css Wed Apr 29 20:32:16 2015
@@ -23,12 +23,15 @@
 /* flexLayout -------------------------------------------------------------- */
 
 .tobago-flexLayout {
-    display: -webkit-flex; /* needed e.g. for 8.0.2 */
+    display: -webkit-flex; /* needed e.g. for Safari 8.0.2 */
+    display: -ms-flexbox; /* needed for IE 10 */
     display: flex;
 }
 
 .tobago-flexLayout-markup-vertically {
     flex-direction: column;
+    -webkit-flex-direction: column;
+    -ms-flex-direction: column;
 }
 
 .tobago-flexLayout > .tobago-date,
@@ -75,7 +78,7 @@ table.tobago-gridLayout > tbody > tr:fir
 
 /* page ----------------------------------------------------------- */
 
-.navbar-fixed-top + .tobago-page-content {
+body > form > .navbar-fixed-top + * {
   margin-top: 70px;
 }