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 2016/05/26 14:29:15 UTC

svn commit: r1745611 [1/2] - in /myfaces/tobago/trunk: 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/tobago/internal/t...

Author: lofwyr
Date: Thu May 26 14:29:14 2016
New Revision: 1745611

URL: http://svn.apache.org/viewvc?rev=1745611&view=rev
Log:
TOBAGO-1529: Navbar, Toolbar, Menu, etc. for Bootstrap
* rename tc:nav to tc:bar
* rename tc:commandGroup to tc:commands
* tc:nav attributes label and image was removed: use <f:facet name="brand"> with a <tc:link> inside

Added:
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIBar.java
      - copied, changed from r1741152, myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIBox.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIButtons.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommands.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/BarTagDeclaration.java
      - copied, changed from r1745590, myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/NavTagDeclaration.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ButtonsTagDeclaration.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/CommandsTagDeclaration.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BarRenderer.java
      - copied, changed from r1741237, myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/NavRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ButtonsRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandsRenderer.java
      - copied, changed from r1741237, myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandGroupRenderer.java
Removed:
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommandGroup.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/BoxToolBarTagDeclaration.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/CommandGroupTagDeclaration.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/NavTagDeclaration.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TabGroupToolBarTagDeclaration.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BoxToolBarRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandGroupRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/NavRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TabGroupToolBarRenderer.java
Modified:
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/Facets.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/RendererTypes.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommand.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIToolBar.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/MenuCommandTagDeclaration.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ToolBarTagDeclaration.java
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/TobagoDemoController.java
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/overview/OverviewController.java
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/20-toolBar/toolBar.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/command.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/menu.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview.properties.xml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview_de.properties.xml
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/css/BootstrapClass.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ButtonRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandRendererBase.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/HeaderRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ImageRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/LabelLayoutRendererBase.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/LinkRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/MenuCommandRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TabGroupRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ToolBarRendererBase.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ToolBarRendererOld.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeCommandRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-menu.js

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/Facets.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/Facets.java?rev=1745611&r1=1745610&r2=1745611&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/Facets.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/Facets.java Thu May 26 14:29:14 2016
@@ -22,6 +22,7 @@ package org.apache.myfaces.tobago.compon
 public enum Facets {
 
   action,
+  brand,
   change,
   checkbox,
   click,
@@ -48,114 +49,31 @@ public enum Facets {
   sorter,
   toolBar;
 
-  /**
-   * @deprecated since 3.0.0. Try to use the enum.
-   */
-  @Deprecated
   public static final String ACTION = "action";
-  /**
-   * @deprecated since 3.0.0. Try to use the enum.
-   */
-  @Deprecated
+  public static final String BRAND = "brand";
   public static final String CHANGE = "change";
-  /**
-   * @deprecated since 3.0.0. Try to use the enum.
-   */
-  @Deprecated
   public static final String CHECKBOX = "checkbox";
-  /**
-   * @deprecated since 3.0.0. Try to use the enum.
-   */
-  @Deprecated
   public static final String CLICK = "click";
-  /**
-   * @deprecated since 3.0.0. Try to use the enum.
-   */
-  @Deprecated
   public static final String COMPLETE = "complete";
-  /**
-   * @deprecated since 3.0.0. Try to use the enum.
-   */
-  @Deprecated
   public static final String CONFIRMATION = "confirmation";
-  /**
-   * @deprecated since 3.0.0. Try to use the enum.
-   */
-  @Deprecated
   public static final String CONSTRAINTS = "constraints";
-  /**
-   * @deprecated since 3.0.0. Try to use the enum.
-   */
-  @Deprecated
   public static final String CONTEXT_MENU = "contextMenu";
-  /**
-   * @deprecated since 3.0.0. Try to use the enum.
-   */
-  @Deprecated
   public static final String DROP_DOWN_MENU = "dropDownMenu";
-  /**
-   * @deprecated since 3.0.0. Try to use the enum.
-   */
-  @Deprecated
   public static final String LABEL = "label";
   /**
-   * @deprecated since 3.0.0. The layout manager tag should surround the content instead. Try to use the enum.
+   * @deprecated since 3.0.0. The layout manager tag should surround the content instead.
    */
   @Deprecated
   public static final String LAYOUT = "layout";
-  /**
-   * @deprecated since 3.0.0. Try to use the enum.
-   */
-  @Deprecated
   public static final String LAYOUT_DEFAULT = "layoutDefault";
-  /**
-   * @deprecated since 3.0.0. Try to use the enum.
-   */
-  @Deprecated
   public static final String MENUBAR = "menuBar";
-  /**
-   * @deprecated since 3.0.0. Try to use the enum.
-   */
-  @Deprecated
   public static final String PAGER_PAGE = "pagerPage";
-  /**
-   * @deprecated since 3.0.0. Try to use the enum.
-   */
-  @Deprecated
   public static final String PAGER_PAGE_DIRECT = "pagerPageDirect";
-  /**
-   * @deprecated since 3.0.0. Try to use the enum.
-   */
-  @Deprecated
   public static final String PAGER_ROW = "pagerRow";
-  /**
-   * @deprecated since 3.0.0. Try to use the enum.
-   */
-  @Deprecated
   public static final String POPUP = "popup";
-  /**
-   * @deprecated since 3.0.0. Try to use the enum.
-   */
-  @Deprecated
   public static final String RADIO = "radio";
-  /**
-   * @deprecated since 3.0.0. Try to use the enum.
-   */
-  @Deprecated
   public static final String RELOAD = "reload";
-  /**
-   * @deprecated since 3.0.0. Try to use the enum.
-   */
-  @Deprecated
   public static final String RESIZE = "resize";
-  /**
-   * @deprecated since 3.0.0. Try to use the enum.
-   */
-  @Deprecated
   public static final String SORTER = "sorter";
-  /**
-   * @deprecated since 3.0.0. Try to use the enum.
-   */
-  @Deprecated
   public static final String TOOL_BAR = "toolBar";
 }

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/RendererTypes.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/RendererTypes.java?rev=1745611&r1=1745610&r2=1745611&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/RendererTypes.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/RendererTypes.java Thu May 26 14:29:14 2016
@@ -24,17 +24,18 @@ package org.apache.myfaces.tobago.compon
  */
 public enum RendererTypes {
 
+  Bar,
   Box,
-  BoxToolBar,
   /** @deprecated */
   @Deprecated
   Button,
+  Buttons,
   Calendar,
   Column,
   SegmentLayout,
   ColumnSelector,
   Command,
-  CommandGroup,
+  Commands,
   Date,
   File,
   FlexLayout,
@@ -56,7 +57,6 @@ public enum RendererTypes {
   MenuBar,
   MenuCommand,
   MenuSeparator,
-  Nav,
   Object,
   Out,
   Page,
@@ -80,7 +80,6 @@ public enum RendererTypes {
   Textarea,
   Tab,
   TabGroup,
-  TabGroupToolBar,
   Time,
   ToolBar,
   Tree,
@@ -95,17 +94,18 @@ public enum RendererTypes {
   TreeSelect,
   Sheet;
 
+  public static final String BAR = "Bar";
   public static final String BOX = "Box";
-  public static final String BOX_TOOL_BAR = "BoxToolBar";
   /** @deprecated */
   @Deprecated
   public static final String BUTTON = "Button";
+  public static final String BUTTONS = "Buttons";
   public static final String CALENDAR = "Calendar";
   public static final String COLUMN = "Column";
   public static final String SEGMENT_LAYOUT = "SegmentLayout";
   public static final String COLUMN_SELECTOR = "ColumnSelector";
   public static final String COMMAND = "Command";
-  public static final String COMMAND_GROUP = "CommandGroup";
+  public static final String COMMANDS = "Commands";
   public static final String DATE = "Date";
   public static final String FILE = "File";
   public static final String FLEX_LAYOUT = "FlexLayout";
@@ -127,7 +127,6 @@ public enum 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";
@@ -151,7 +150,6 @@ public enum RendererTypes {
   public static final String TEXTAREA = "Textarea";
   public static final String TAB = "Tab";
   public static final String TAB_GROUP = "TabGroup";
-  public static final String TAB_GROUP_TOOL_BAR = "TabGroupToolBar";
   public static final String TIME = "Time";
   public static final String TOOL_BAR = "ToolBar";
   public static final String TREE = "Tree";

Copied: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIBar.java (from r1741152, myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIBox.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIBar.java?p2=myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIBar.java&p1=myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIBox.java&r1=1741152&r2=1745611&rev=1745611&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIBox.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIBar.java Thu May 26 14:29:14 2016
@@ -19,33 +19,7 @@
 
 package org.apache.myfaces.tobago.internal.component;
 
-import javax.faces.context.FacesContext;
+public abstract class AbstractUIBar extends AbstractUIPanel {
 
-public abstract class AbstractUIBox extends AbstractUIPanel {
-
-  @Override
-  public void processDecodes(final FacesContext context) {
-    if (isCollapsed()) {
-      decode(context);
-    } else {
-      super.processDecodes(context);
-    }
-  }
-
-  @Override
-  public void processValidators(final FacesContext context) {
-    if (!isCollapsed()) {
-      super.processValidators(context);
-    }
-  }
-
-  @Override
-  public void processUpdates(final FacesContext context) {
-    if (!isCollapsed()) {
-      super.processUpdates(context);
-    }
-  }
-
-  public abstract boolean isCollapsed();
 
 }

Added: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIButtons.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIButtons.java?rev=1745611&view=auto
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIButtons.java (added)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIButtons.java Thu May 26 14:29:14 2016
@@ -0,0 +1,6 @@
+package org.apache.myfaces.tobago.internal.component;
+
+import org.apache.myfaces.tobago.component.UIPanel;
+
+public class AbstractUIButtons extends UIPanel {
+}

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommand.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommand.java?rev=1745611&r1=1745610&r2=1745611&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommand.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommand.java Thu May 26 14:29:14 2016
@@ -33,6 +33,7 @@ import org.slf4j.LoggerFactory;
 import javax.el.MethodExpression;
 import javax.faces.component.UICommand;
 import javax.faces.component.UIComponent;
+import javax.faces.component.UIInput;
 import javax.faces.component.behavior.ClientBehaviorHolder;
 import javax.faces.context.FacesContext;
 import javax.faces.event.FacesEvent;
@@ -110,7 +111,7 @@ public abstract class AbstractUICommand
     if (parentOfCommands == null) {
       parentOfCommands = false;
       for (UIComponent child : getChildren()) {
-        if (child instanceof UICommand) {
+        if (child instanceof UICommand || child instanceof UIInput) {
           parentOfCommands = true;
           break;
         }

Added: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommands.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommands.java?rev=1745611&view=auto
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommands.java (added)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommands.java Thu May 26 14:29:14 2016
@@ -0,0 +1,6 @@
+package org.apache.myfaces.tobago.internal.component;
+
+import org.apache.myfaces.tobago.component.UIPanel;
+
+public class AbstractUICommands extends UIPanel {
+}

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIToolBar.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIToolBar.java?rev=1745611&r1=1745610&r2=1745611&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIToolBar.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIToolBar.java Thu May 26 14:29:14 2016
@@ -22,16 +22,4 @@ package org.apache.myfaces.tobago.intern
 import org.apache.myfaces.tobago.component.Visual;
 
 public abstract class AbstractUIToolBar extends javax.faces.component.UIPanel implements Visual {
-
-  public static final String LABEL_BOTTOM = "bottom";
-  public static final String LABEL_RIGHT = "right";
-  public static final String LABEL_OFF = "off";
-
-  public static final String ICON_SMALL = "small";
-  public static final String ICON_BIG = "big";
-  public static final String ICON_OFF = "off";
-
-  public static final String ORIENTATION_LEFT = "left";
-  public static final String ORIENTATION_RIGHT = "right";
-
 }

Copied: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/BarTagDeclaration.java (from r1745590, myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/NavTagDeclaration.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/BarTagDeclaration.java?p2=myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/BarTagDeclaration.java&p1=myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/NavTagDeclaration.java&r1=1745590&r2=1745611&rev=1745611&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/NavTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/BarTagDeclaration.java Thu May 26 14:29:14 2016
@@ -19,27 +19,30 @@
 
 package org.apache.myfaces.tobago.internal.taglib.component;
 
+import org.apache.myfaces.tobago.apt.annotation.Facet;
 import org.apache.myfaces.tobago.apt.annotation.Tag;
 import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
+import org.apache.myfaces.tobago.component.Facets;
 import org.apache.myfaces.tobago.component.RendererTypes;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasIdBindingAndRendered;
-import org.apache.myfaces.tobago.internal.taglib.declaration.HasImage;
-import org.apache.myfaces.tobago.internal.taglib.declaration.HasLabel;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasTip;
 import org.apache.myfaces.tobago.internal.taglib.declaration.IsVisual;
 
 import javax.faces.component.UIPanel;
 
 /**
- * Defines a navigation element
+ * Defines a container for navigation elements, branding, ...
  */
-@Tag(name = "nav")
+@Tag(name = "bar")
 @UIComponentTag(
-    uiComponent = "org.apache.myfaces.tobago.component.UINav",
+    uiComponent = "org.apache.myfaces.tobago.component.UIBar",
     uiComponentBaseClass = "javax.faces.component.UIPanel",
     componentFamily = UIPanel.COMPONENT_FAMILY,
-    rendererType = RendererTypes.NAV,
-    allowedChildComponenents = "ALL")
-public interface NavTagDeclaration
-    extends HasIdBindingAndRendered, HasTip, HasImage, HasLabel, IsVisual {
+    rendererType = RendererTypes.BAR,
+facets = {
+    @Facet(
+        name = Facets.BRAND,
+        description = "Contains an element which will get a 'navbar-brand' style, e.g. use <tc:link> ")})
+public interface BarTagDeclaration
+    extends HasIdBindingAndRendered, HasTip, IsVisual {
 }

Added: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ButtonsTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ButtonsTagDeclaration.java?rev=1745611&view=auto
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ButtonsTagDeclaration.java (added)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ButtonsTagDeclaration.java Thu May 26 14:29:14 2016
@@ -0,0 +1,44 @@
+/*
+ * 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.HasIdBindingAndRendered;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasTip;
+import org.apache.myfaces.tobago.internal.taglib.declaration.IsVisual;
+
+import javax.faces.component.UIPanel;
+
+/**
+ * Renders a group of buttons.
+ */
+@Tag(name = "buttons")
+@UIComponentTag(
+    uiComponent = "org.apache.myfaces.tobago.component.UIButtons",
+    uiComponentBaseClass = "javax.faces.component.UIPanel",
+    componentFamily = UIPanel.COMPONENT_FAMILY,
+    rendererType = RendererTypes.BUTTONS)
+
+public interface ButtonsTagDeclaration
+    extends HasIdBindingAndRendered, IsVisual, HasTip {
+
+}

Added: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/CommandsTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/CommandsTagDeclaration.java?rev=1745611&view=auto
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/CommandsTagDeclaration.java (added)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/CommandsTagDeclaration.java Thu May 26 14:29:14 2016
@@ -0,0 +1,38 @@
+/*
+ * 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 javax.faces.component.UIPanel;
+
+/**
+ * Defines a navigation element, which contains a menu-like structure
+ */
+@Tag(name = "commands")
+@UIComponentTag(
+    uiComponent = "org.apache.myfaces.tobago.component.UICommands",
+    uiComponentBaseClass = "org.apache.myfaces.tobago.internal.component.AbstractUICommands",
+    componentFamily = UIPanel.COMPONENT_FAMILY,
+    rendererType = RendererTypes.COMMANDS)
+public interface CommandsTagDeclaration {
+}

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/MenuCommandTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/MenuCommandTagDeclaration.java?rev=1745611&r1=1745610&r2=1745611&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/MenuCommandTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/MenuCommandTagDeclaration.java Thu May 26 14:29:14 2016
@@ -42,7 +42,9 @@ import javax.faces.component.UICommand;
 
 /**
  * Renders a menu item. (This tag was renamed from tc:menuItem since Tobago 1.5.0)
+ * @deprecated Please use &lt;tc:command/&gt; instead.
  */
+@Deprecated
 @Tag(name = "menuCommand")
 @UIComponentTag(
     uiComponent = "org.apache.myfaces.tobago.component.UIMenuCommand",

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ToolBarTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ToolBarTagDeclaration.java?rev=1745611&r1=1745610&r2=1745611&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ToolBarTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ToolBarTagDeclaration.java Thu May 26 14:29:14 2016
@@ -19,13 +19,12 @@
 
 package org.apache.myfaces.tobago.internal.taglib.component;
 
-import org.apache.myfaces.tobago.apt.annotation.BodyContentDescription;
 import org.apache.myfaces.tobago.apt.annotation.Tag;
-import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
 import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
-import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
 import org.apache.myfaces.tobago.component.RendererTypes;
-import org.apache.myfaces.tobago.internal.component.AbstractUIToolBar;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasIdBindingAndRendered;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasTip;
+import org.apache.myfaces.tobago.internal.taglib.declaration.IsVisual;
 
 import javax.faces.component.UIPanel;
 
@@ -33,62 +32,15 @@ import javax.faces.component.UIPanel;
  * Renders a toolbar.<br>
  * Allowed subcomponents are subtypes of UICommand i.e.
  * <code>'button'</code> and <code>'link'</code> tags.
- * These are rendered by ToolbarRenderer, so the result has
- * no difference.<br>
- * To add an drop down menu to a button add a facet <code>'dropDownMenu'</code>
- * containing a
- * <a href="menu.html"><code>&lt;tc:menu&gt;</code></a>
- * tag to the button. Label's and Image's on those menu tag's are ignored
- * and replaced by the renderer.
- * <pre>
- *      &lt;tc:button onclick="alert('test 0')"
- *          label="Alert 0" &gt;
- *        &lt;f:facet name="dropDownMenu"&gt;
- *          &lt;tc:menu&gt;
- *            &lt;tc:menuCommand onclick="alert('test 1')" label="Alert 1"/&gt;
- *            &lt;tc:menuCommand onclick="alert('test 2')" label="Alert 2"/&gt;
- *            &lt;tc:menuCommand onclick="alert('test 3')" label="Alert 3"/&gt;
- *          &lt;/tc:menu&gt;
- *        &lt;/f:facet&gt;
- *      &lt;/tc:button&gt;
- *      </pre>
  */
 
 @Tag(name = "toolBar")
-@BodyContentDescription(anyTagOf = "(<tc:toolBarCommand>|<tc:toolBarSelectBoolean>|<tc:toolBarSelectOne>)* ")
+// TODO: @BodyContentDescription(anyTagOf = "(<tc:command>|<tc:selectBoolean>|<tc:selectOne>)* ")
 @UIComponentTag(
     uiComponent = "org.apache.myfaces.tobago.component.UIToolBar",
     uiComponentBaseClass = "org.apache.myfaces.tobago.internal.component.AbstractUIToolBar",
     uiComponentFacesClass = "javax.faces.component.UIPanel",
     componentFamily = UIPanel.COMPONENT_FAMILY,
-    rendererType = RendererTypes.TOOL_BAR,
-    allowedChildComponenents = {
-        "org.apache.myfaces.tobago.SelectOneCommand",
-        "org.apache.myfaces.tobago.SelectBooleanCommand",
-        "org.apache.myfaces.tobago.Command"})
-public interface ToolBarTagDeclaration extends PanelTagDeclaration {
-  /**
-   * Position of the button label, possible values are: right, bottom, off.
-   * If toolbar is facet of box: bottom is changed to right!
-   */
-  @TagAttribute
-  @UIComponentTagAttribute(defaultValue = AbstractUIToolBar.LABEL_BOTTOM,
-      allowedValues = {AbstractUIToolBar.LABEL_BOTTOM, AbstractUIToolBar.LABEL_RIGHT, AbstractUIToolBar.LABEL_OFF})
-  void setLabelPosition(String labelPosition);
-
-  /**
-   * Size of button images, possible values are: small, big, off.
-   */
-  @TagAttribute
-  @UIComponentTagAttribute(defaultValue = AbstractUIToolBar.ICON_SMALL,
-      allowedValues = {AbstractUIToolBar.ICON_SMALL, AbstractUIToolBar.ICON_BIG, AbstractUIToolBar.ICON_OFF})
-  void setIconSize(String iconSize);
-
-  /**
-   * Orientation of toolbar
-   */
-  @TagAttribute
-  @UIComponentTagAttribute(defaultValue = AbstractUIToolBar.ORIENTATION_LEFT,
-      allowedValues = {AbstractUIToolBar.ORIENTATION_LEFT, AbstractUIToolBar.ORIENTATION_RIGHT})
-  void setOrientation(String orientation);
+    rendererType = RendererTypes.TOOL_BAR)
+public interface ToolBarTagDeclaration extends HasIdBindingAndRendered, IsVisual, HasTip {
 }

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/TobagoDemoController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/TobagoDemoController.java?rev=1745611&r1=1745610&r2=1745611&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/TobagoDemoController.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/TobagoDemoController.java Thu May 26 14:29:14 2016
@@ -109,14 +109,6 @@ public class TobagoDemoController implem
 
   private SheetState sheetTreeState;
 
-  private String toolbarIconSize;
-
-  private SelectItem[] toolbarIconItems;
-
-  private String toolbarTextPosition;
-
-  private SelectItem[] toolbarTextItems;
-
   private TabChangeListener tabChangeListener;
 
   private String[] selectManyShuttle;
@@ -166,16 +158,6 @@ public class TobagoDemoController implem
     showRootJunction = true;
 
     solar = new Solar();
-
-    final String[] toolbarIconKeys
-        = {UIToolBar.ICON_OFF, UIToolBar.ICON_SMALL, UIToolBar.ICON_BIG};
-    toolbarIconItems = getSelectItems(toolbarIconKeys, "demo");
-    toolbarIconSize = UIToolBar.ICON_SMALL;
-
-    final String[] toolbarTextKeys =
-        {UIToolBar.LABEL_OFF, UIToolBar.LABEL_BOTTOM, UIToolBar.LABEL_RIGHT};
-    toolbarTextItems = getSelectItems(toolbarTextKeys, "demo");
-    toolbarTextPosition = UIToolBar.LABEL_BOTTOM;
   }
 
 
@@ -546,30 +528,6 @@ public class TobagoDemoController implem
     }
   }
 
-  public SelectItem[] getToolbarIconItems() {
-    return toolbarIconItems;
-  }
-
-  public String getToolbarIconSize() {
-    return toolbarIconSize;
-  }
-
-  public void setToolbarIconSize(final String toolbarIconSize) {
-    this.toolbarIconSize = toolbarIconSize;
-  }
-
-  public SelectItem[] getToolbarTextItems() {
-    return toolbarTextItems;
-  }
-
-  public String getToolbarTextPosition() {
-    return toolbarTextPosition;
-  }
-
-  public void setToolbarTextPosition(final String toolbarTextPosition) {
-    this.toolbarTextPosition = toolbarTextPosition;
-  }
-
   public Object getNull() {
     return null;
   }

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/overview/OverviewController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/overview/OverviewController.java?rev=1745611&r1=1745610&r2=1745611&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/overview/OverviewController.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/overview/OverviewController.java Thu May 26 14:29:14 2016
@@ -22,7 +22,6 @@ package org.apache.myfaces.tobago.exampl
 import org.apache.commons.lang.StringUtils;
 import org.apache.deltaspike.core.api.scope.WindowScoped;
 import org.apache.myfaces.tobago.component.UISheet;
-import org.apache.myfaces.tobago.component.UIToolBar;
 import org.apache.myfaces.tobago.context.ResourceManagerUtils;
 import org.apache.myfaces.tobago.example.data.LocaleList;
 import org.apache.myfaces.tobago.example.data.Salutation;
@@ -95,15 +94,6 @@ public class OverviewController implemen
 
   private SheetConfig sheetConfig;
 
-  private String toolbarIconSize;
-
-  private SelectItem[] toolbarIconItems;
-
-  private String toolbarTextPosition;
-
-  private SelectItem[] toolbarTextItems;
-
-
   public OverviewController() {
     radioValue = "JPY";
     currencyItems = new Currency[]{
@@ -117,21 +107,6 @@ public class OverviewController implemen
     treeListboxSelectMode = TREELISTBOX_SELECT_MODE_KEYS[0];
     multiValue = new Salutation[0];
     sheetConfig = new SheetConfig();
-    final String[] toolbarIconKeys
-        = {UIToolBar.ICON_OFF, UIToolBar.ICON_SMALL, UIToolBar.ICON_BIG};
-    toolbarIconItems = new SelectItem[toolbarIconKeys.length];
-    for (int i = 0; i < toolbarIconKeys.length; i++) {
-      toolbarIconItems[i] = new SelectItem(toolbarIconKeys[i], toolbarIconKeys[i]);
-    }
-    toolbarIconSize = UIToolBar.ICON_SMALL;
-
-    final String[] toolbarTextKeys =
-        {UIToolBar.LABEL_OFF, UIToolBar.LABEL_BOTTOM, UIToolBar.LABEL_RIGHT};
-    toolbarTextItems = new SelectItem[toolbarTextKeys.length];
-    for (int i = 0; i < toolbarTextKeys.length; i++) {
-      toolbarTextItems[i] = new SelectItem(toolbarTextKeys[i], toolbarTextKeys[i]);
-    }
-    toolbarTextPosition = UIToolBar.LABEL_BOTTOM;
   }
 
   private static SelectItem[] getSalutationSelectItems(final String bundle) {
@@ -325,38 +300,6 @@ public class OverviewController implemen
     this.sheetConfig = sheetConfig;
   }
 
-    public String getToolbarIconSize() {
-        return toolbarIconSize;
-    }
-
-    public void setToolbarIconSize(final String toolbarIconSize) {
-        this.toolbarIconSize = toolbarIconSize;
-    }
-
-    public SelectItem[] getToolbarIconItems() {
-        return toolbarIconItems;
-    }
-
-    public void setToolbarIconItems(final SelectItem[] toolbarIconItems) {
-        this.toolbarIconItems = toolbarIconItems;
-    }
-
-    public String getToolbarTextPosition() {
-        return toolbarTextPosition;
-    }
-
-    public void setToolbarTextPosition(final String toolbarTextPosition) {
-        this.toolbarTextPosition = toolbarTextPosition;
-    }
-
-    public SelectItem[] getToolbarTextItems() {
-        return toolbarTextItems;
-    }
-
-    public void setToolbarTextItems(final SelectItem[] toolbarTextItems) {
-        this.toolbarTextItems = toolbarTextItems;
-    }
-
   public List<String> getInputSuggestItems(final UIInput component) {
     String substring = (String) component.getSubmittedValue();
     if (substring == null) {

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/20-toolBar/toolBar.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/20-toolBar/toolBar.xhtml?rev=1745611&r1=1745610&r2=1745611&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/20-toolBar/toolBar.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/20-toolBar/toolBar.xhtml Thu May 26 14:29:14 2016
@@ -32,22 +32,19 @@
 
   <tc:box label="#{overviewBundle.toolbar_sampleTitle}" id="boxToolbar">
 
-    <f:facet name="layout">
-      <tc:gridLayout rows="auto;auto;auto" columns="2*;1*;1*" id="boxToolbarLayout"/>
-    </f:facet>
-
     <f:facet name="toolBar">
       <tc:toolBar>
-        <tc:toolBarCommand id="button" action="overview/toolbar"
+        <tc:buttons>
+        <tc:button id="button" action="overview/toolbar"
                            actionListener="#{overviewController.click}"
                            label="#{overviewBundle.toolbar_buttonAction}"/>
 
         <tc:toolBarCommand id="imageButton" action="#{overviewController.ping}"
                            actionListener="#{overviewController.click}"
-                           label="#{overviewBundle.toolbar_imageButtonAction}"
-                           image="image/toolbar_example_button.png"/>
+                           tip="Bicycle"
+                           image="fa-bicycle"/>
 
-        <tc:toolBarCommand id="popupButton"
+        <tc:button id="popupButton" image="Bus"
                            actionListener="#{overviewController.click}"
                            label="#{overviewBundle.toolbar_popupButtonAction}">
 
@@ -74,9 +71,9 @@
 
             </tc:popup>
           </f:facet>
-        </tc:toolBarCommand>
+        </tc:button>
 
-        <tc:toolBarCommand id="DropDown"
+        <tc:button id="DropDown"
                            label="#{overviewBundle.toolbar_dropDownAction}"
                            omit="true">
           <f:facet name="dropDownMenu">
@@ -91,14 +88,12 @@
                               actionListener="#{overviewController.click}" label="Action 3"/>
             </tc:menu>
           </f:facet>
-        </tc:toolBarCommand>
-
+        </tc:button>
+        </tc:buttons>
       </tc:toolBar>
     </f:facet>
 
-    <tc:toolBar iconSize="#{overviewController.toolbarIconSize}"
-                labelPosition="#{overviewController.toolbarTextPosition}"
-                orientation="left">
+    <tc:toolBar orientation="left">
       <tc:gridLayoutConstraint columnSpan="3"/>
       <tc:toolBarCommand id="button2" action="overview/toolbar"
                          actionListener="#{overviewController.click}"
@@ -106,7 +101,7 @@
 
       <tc:toolBarCommand id="imageButton2" action="overview/toolbar"
                          actionListener="#{overviewController.click}"
-                         label="#{overviewBundle.toolbar_imageButtonAction}"
+                         label="Hallo"
                          image="image/toolbar_example_button.png"/>
 
 
@@ -137,13 +132,6 @@
     <tc:in value="#{overviewController.lastAction}" readonly="true"
            label="#{overviewBundle.basic_lastActionLabel}"/>
 
-    <tc:selectOneChoice value="#{overviewController.toolbarTextPosition}">
-      <f:selectItems value="#{overviewController.toolbarTextItems}"/>
-    </tc:selectOneChoice>
-    <tc:selectOneChoice value="#{overviewController.toolbarIconSize}">
-      <f:selectItems value="#{overviewController.toolbarIconItems}"/>
-    </tc:selectOneChoice>
-
     <tc:panel/>
     <tc:button label="updateView">
       <tc:gridLayoutConstraint columnSpan="2"/>

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/command.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/command.xhtml?rev=1745611&r1=1745610&r2=1745611&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/command.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/command.xhtml Thu May 26 14:29:14 2016
@@ -19,10 +19,77 @@
 
 <ui:composition template="/main.xhtml"
                 xmlns:tc="http://myfaces.apache.org/tobago/component"
-                xmlns:ui="http://java.sun.com/jsf/facelets">
+                xmlns:ui="http://java.sun.com/jsf/facelets"
+                xmlns:f="http://java.sun.com/jsf/core">
 
   <ui:param name="title" value="TODO"/>
 
-TODO
+  <hr/>
+  toolbar
+  <hr/>
+
+  <tc:toolBar>
+    <tc:buttons>
+      <tc:button image="fa-universal-access" label="Hallo 1"/>
+      <tc:button image="fa-hand-paper-o" label="Hallo"/>
+    </tc:buttons>
+    <tc:button image="fa-hourglass" label="Hallo"/>
+    <tc:in label="Search"/>
+  </tc:toolBar>
+
+  <hr/>
+  bar
+  <hr/>
+
+  <tc:bar>
+    <f:facet name="brand">
+      <tc:link image="image/feather-leaf.png" label="Tobago Demo"/>
+    </f:facet>
+
+
+    <tc:commands>
+      <tc:buttons>
+        <tc:button image="fa-universal-access" label="Hallo 2"/>
+        <tc:button image="fa-hand-paper-o" label="Hallo"/>
+      </tc:buttons>
+      <tc:button image="fa-hourglass" label="Hallo"/>
+    </tc:commands>
+
+    <tc:flowLayout>
+      <tc:style textAlign="right" />
+      <tc:in label="Search"/>
+    </tc:flowLayout>
+  </tc:bar>
+
+  <hr/>
+  other
+  <hr/>
+
+  <tc:link image="fa-hourglass" label="Hallo 3" omit="true">
+    <tc:link image="fa-universal-access" label="Hallo"/>
+    <tc:link image="fa-hand-paper-o" label="Hallo"/>
+  </tc:link>
+
+  <tc:buttons>
+    <tc:button id="b1" image="fa-hourglass" label="Hallo 4" omit="true">
+      <tc:link image="fa-universal-access" label="Hallo 4a"/>
+      <tc:link image="fa-hand-paper-o" label="Hallo 4b"/>
+    </tc:button>
+
+    <tc:button id="b2" image="fa-hourglass" label="Hallo 5" omit="true">
+      <tc:link image="fa-universal-access" label="Hallo 5a"/>
+      <tc:link image="fa-hand-paper-o" label="Hallo 5b"/>
+    </tc:button>
+  </tc:buttons>
+
+  <tc:button label="Theme" omit="true">
+    <tc:selectOneRadio value="#{clientConfigController.theme}">
+      <f:facet name="change">
+        <tc:command action="#{clientConfigController.submit}"/>
+      </f:facet>
+      <tc:selectItems value="#{clientConfigController.themeItems}"/>
+    </tc:selectOneRadio>
+  </tc:button>
+
 
 </ui:composition>

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/menu.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/menu.xhtml?rev=1745611&r1=1745610&r2=1745611&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/menu.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/menu.xhtml Thu May 26 14:29:14 2016
@@ -24,40 +24,44 @@
   <!-- tbd: how to solve this? -->
   <tc:style customClass="bg-inverse"/>
 
+<!--
   <tc:flexLayout columns="auto;*" alignItems="center">
 
     <tc:image value="image/feather-leaf.png"/>
+-->
 
-    <tc:nav label="Tobago Demo">
+    <tc:bar id="bar">
+    <!--<tc:bar image="image/feather-leaf.png" label="Tobago Demo" id="bar">-->
+      <f:facet name="brand">
+        <tc:link image="image/feather-leaf.png" label="Tobago Demo" id="brand" link="/"/>
+      </f:facet>
 
       <tc:form id="header">
 
-        <tc:commandGroup>
+        <tc:commands id="XXX">
 
-          <tc:command label="#{overviewBundle.menu_config}" omit="true">
+          <tc:command id="CCC" label="#{overviewBundle.menu_config}" omit="true">
             <tc:command label="#{overviewBundle.menu_themes}" omit="true">
               <!-- XXX this is a workaround until TOBAGO-1506 is resolved
               the next sourrounding tag <tc:command> should not be needed.
               -->
-              <tc:command omit="true">
+              <!--<tc:command omit="true">-->
                 <tc:selectOneRadio value="#{clientConfigController.theme}">
                   <f:facet name="change">
                     <tc:command action="#{clientConfigController.submit}"/>
                   </f:facet>
                   <tc:selectItems value="#{clientConfigController.themeItems}"/>
                 </tc:selectOneRadio>
-              </tc:command>
+              <!--</tc:command>-->
             </tc:command>
             <tc:command label="#{overviewBundle.menu_locale}">
-              <tc:command action="#{clientConfigController.submit}">
-                <tc:selectOneRadio value="#{clientConfigController.locale}">
-                  <!-- XXX this is a workaround until TOBAGO-1506 is resolved -->
-                  <f:facet name="change">
-                    <tc:command action="#{clientConfigController.submit}"/>
-                  </f:facet>
-                  <tc:selectItems value="#{clientConfigController.localeItems}"/>
-                </tc:selectOneRadio>
-              </tc:command>
+              <tc:selectOneRadio value="#{clientConfigController.locale}">
+                <!-- XXX this is a workaround until TOBAGO-1506 is resolved -->
+                <f:facet name="change">
+                  <tc:command action="#{clientConfigController.submit}"/>
+                </f:facet>
+                <tc:selectItems value="#{clientConfigController.localeItems}"/>
+              </tc:selectOneRadio>
             </tc:command>
             <tc:command action="#{demo.resetSession}" label="Reset"/>
           </tc:command>
@@ -87,18 +91,18 @@
             </tc:command>
           </tc:command>
 
-        </tc:commandGroup>
-        <!-- TBD: this is not nice: can we put tc:out or tc:label into the menu?  -->
-        <tc:commandGroup id="headerInfo">
+          <!-- TBD: this is not nice: can we put tc:out or tc:label into the menu?
+          or we do that with a popup, oder a lighter variant of a popup -->
           <tc:command omit="true" label="Info">
-            <tc:command omit="true" label="Theme: #{clientConfigController.localizedTheme}"/>
+            <tc:command omit="true" label="Theme: #{clientConfigController.localizedTheme}" disabled="true"/>
             <tc:command omit="true" label="Locale: #{clientConfigController.localizedLocale}"/>
             <tc:command omit="true" label="Project Stage: #{tobagoContext.tobagoConfig.projectStage}"/>
             <tc:command omit="true" label="CSP mode: #{tobagoContext.tobagoConfig.contentSecurityPolicy.mode}"/>
             <tc:command omit="true"
                         label="Requests: #{activityList.values[0].jsfRequest} / AJAX: #{activityList.values[0].ajaxRequest}"/>
           </tc:command>
-        </tc:commandGroup>
+
+        </tc:commands>
       </tc:form>
 
       <tc:flowLayout>
@@ -128,8 +132,10 @@
         </tc:form>
       </tc:flowLayout>
 
-    </tc:nav>
+    </tc:bar>
 
+<!--
   </tc:flexLayout>
+-->
 
 </tc:header>

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview.properties.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview.properties.xml?rev=1745611&r1=1745610&r2=1745611&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview.properties.xml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview.properties.xml Thu May 26 14:29:14 2016
@@ -270,7 +270,6 @@
 <entry key="toolbar_popupText">To close this popup window click close button.</entry>
 <entry key="toolbar_dropDownAction">DropDown</entry>
 <entry key="toolbar_buttonAction">Text Button</entry>
-<entry key="toolbar_imageButtonAction">Image Button</entry>
 <entry key="toolbar_sampleTitle">Toolbar Example</entry>
 <entry key="toolbar_text1">Toolbars can be used for context sensitive actions inside box controls.
 &lt;ul style="margin-top: 2px;"&gt;

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview_de.properties.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview_de.properties.xml?rev=1745611&r1=1745610&r2=1745611&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview_de.properties.xml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview_de.properties.xml Thu May 26 14:29:14 2016
@@ -142,7 +142,6 @@
   <entry key="toolbar_popupText">Zum schließen dieses Fensters den Button drücken.</entry>
   <entry key="toolbar_dropDownAction">DropDown</entry>
   <entry key="toolbar_buttonAction">Text Button</entry>
-  <entry key="toolbar_imageButtonAction">Image Button</entry>
   <entry key="toolbar_sampleTitle">Toolbar Beispiel</entry>
   <entry key="toolbar_text1">Toolbars werden genutzt um kontextabhängige Aktionen in Box Elementen zur Verfügung zu stellen:
   &lt;ul style="margin-top: 2px;"&gt;

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/css/BootstrapClass.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/css/BootstrapClass.java?rev=1745611&r1=1745610&r2=1745611&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/css/BootstrapClass.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/css/BootstrapClass.java Thu May 26 14:29:14 2016
@@ -40,6 +40,7 @@ public enum BootstrapClass implements Cs
   BTN_GROUP("btn-group"),
   BTN_PRIMARY("btn-primary"),
   BTN_SECONDARY("btn-secondary"),
+  BTN_TOOLBAR("btn-toolbar"),
   CARD("card"),
   CARD_BLOCK("card-block"),
   CARD_HEADER("card-header"),

Copied: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BarRenderer.java (from r1741237, myfaces/tobago/trunk/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/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BarRenderer.java?p2=myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BarRenderer.java&p1=myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/NavRenderer.java&r1=1741237&r2=1745611&rev=1745611&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/NavRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BarRenderer.java Thu May 26 14:29:14 2016
@@ -19,9 +19,9 @@
 
 package org.apache.myfaces.tobago.renderkit.html.standard.standard.tag;
 
-import org.apache.myfaces.tobago.component.UINav;
-import org.apache.myfaces.tobago.context.ResourceManagerUtils;
-import org.apache.myfaces.tobago.internal.component.AbstractUICommandGroup;
+import org.apache.myfaces.tobago.component.Facets;
+import org.apache.myfaces.tobago.component.UIBar;
+import org.apache.myfaces.tobago.internal.component.AbstractUICommands;
 import org.apache.myfaces.tobago.internal.component.AbstractUIForm;
 import org.apache.myfaces.tobago.renderkit.RendererBase;
 import org.apache.myfaces.tobago.renderkit.css.BootstrapClass;
@@ -33,32 +33,34 @@ import org.apache.myfaces.tobago.renderk
 import org.apache.myfaces.tobago.renderkit.html.HtmlRoleValues;
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils;
 import org.apache.myfaces.tobago.renderkit.util.JQueryUtils;
+import org.apache.myfaces.tobago.renderkit.util.RenderUtils;
+import org.apache.myfaces.tobago.util.ComponentUtils;
 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 {
+public class BarRenderer extends RendererBase {
 
   @Override
   public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {
 
-    final UINav nav = (UINav) component;
+    final UIBar bar = (UIBar) component;
     final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
 
-    final String clientId = nav.getClientId(facesContext);
+    final String clientId = bar.getClientId(facesContext);
     final String navbarId = clientId + "::navbar";
 
-    writer.startElement(HtmlElements.NAV);
+    writer.startElement(HtmlElements.DIV);
     writer.writeIdAttribute(clientId);
     writer.writeAttribute(HtmlAttributes.ROLE, HtmlRoleValues.NAVIGATION.toString(), false);
-    HtmlRendererUtils.writeDataAttributes(facesContext, writer, nav);
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, bar);
 
     writer.startElement(HtmlElements.DIV);
     writer.writeClassAttribute(BootstrapClass.CONTAINER_FLUID);
 
-    encodeOpener(facesContext, nav, writer, navbarId);
+    encodeOpener(facesContext, bar, writer, navbarId);
 
     writer.startElement(HtmlElements.DIV);
     writer.writeIdAttribute(navbarId);
@@ -83,7 +85,7 @@ public class NavRenderer extends Rendere
         if (child instanceof AbstractUIForm) {
           helper.mayEnd();
           encodeChildren(facesContext, child);
-        } else if (child instanceof AbstractUICommandGroup) {
+        } else if (child instanceof AbstractUICommands) {
           helper.mayEnd();
           child.encodeAll(facesContext);
         } else {
@@ -101,11 +103,11 @@ public class NavRenderer extends Rendere
     final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
     writer.endElement(HtmlElements.DIV);
     writer.endElement(HtmlElements.DIV);
-    writer.endElement(HtmlElements.NAV);
+    writer.endElement(HtmlElements.DIV);
   }
 
   private void encodeOpener(
-      FacesContext facesContext, UINav nav, TobagoResponseWriter writer, String navbarId) throws IOException {
+      FacesContext facesContext, UIBar bar, TobagoResponseWriter writer, String navbarId) throws IOException {
 
     // todo: consolidate this rendering with ToolBarRenderer
 
@@ -128,23 +130,11 @@ public class NavRenderer extends Rendere
 
     writer.endElement(HtmlElements.BUTTON);
 
-    final String image = nav.getImage();
-    if (image != null) {
-      final String src = ResourceManagerUtils.getImageWithPath(facesContext, image);
-      if (src != null) {
-        writer.startElement(HtmlElements.IMG);
-        writer.writeClassAttribute(BootstrapClass.NAVBAR_BRAND);
-        writer.writeAttribute(HtmlAttributes.SRC, src, true);
-        writer.writeAttribute(HtmlAttributes.ALT, "", false);
-        writer.endElement(HtmlElements.IMG);
-      }
-    }
-
-    final String label = nav.getLabel();
-    if (label != null) {
+    final UIComponent brand = ComponentUtils.getFacet(bar, Facets.brand);
+    if (brand != null) {
       writer.startElement(HtmlElements.SPAN);
       writer.writeClassAttribute(BootstrapClass.NAVBAR_BRAND);
-      writer.writeText(label);
+      RenderUtils.encode(facesContext, brand);
       writer.endElement(HtmlElements.SPAN);
     }
 

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ButtonRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ButtonRenderer.java?rev=1745611&r1=1745610&r2=1745611&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ButtonRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ButtonRenderer.java Thu May 26 14:29:14 2016
@@ -40,6 +40,7 @@ public class ButtonRenderer extends Comm
   protected void encodeBeginElement(final FacesContext facesContext, final AbstractUICommand command)
       throws IOException {
     final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+
     writer.startElement(HtmlElements.BUTTON);
     writer.writeAttribute(HtmlAttributes.TYPE, HtmlButtonTypes.BUTTON);
   }
@@ -48,10 +49,32 @@ public class ButtonRenderer extends Comm
   protected void encodeEndElement(final FacesContext facesContext, final AbstractUICommand command)
       throws IOException {
     final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+
     writer.endElement(HtmlElements.BUTTON);
   }
 
   @Override
+  protected void encodeBeginOuter(final FacesContext facesContext, final AbstractUICommand command)
+      throws IOException {
+    final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+
+//    if (isMarked(facesContext, MARKER)) { // this is only needed, if button has a sub-menu (dropdown)
+      writer.startElement(HtmlElements.SPAN);
+      writer.writeClassAttribute(BootstrapClass.BTN_GROUP);
+//    }
+  }
+
+  @Override
+  protected void encodeEndOuter(final FacesContext facesContext, final AbstractUICommand command)
+      throws IOException {
+    final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+
+//    if (isMarked(facesContext, MARKER)) {
+      writer.endElement(HtmlElements.SPAN);
+//    }
+  }
+
+  @Override
   protected void addCssItems(
       final FacesContext facesContext, final AbstractUICommand command, final List<CssItem> collected) {
 

Added: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ButtonsRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ButtonsRenderer.java?rev=1745611&view=auto
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ButtonsRenderer.java (added)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ButtonsRenderer.java Thu May 26 14:29:14 2016
@@ -0,0 +1,62 @@
+/*
+ * 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.component.UIButtons;
+import org.apache.myfaces.tobago.internal.component.AbstractUIButtons;
+import org.apache.myfaces.tobago.renderkit.RendererBase;
+import org.apache.myfaces.tobago.renderkit.css.BootstrapClass;
+import org.apache.myfaces.tobago.renderkit.css.Classes;
+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 ButtonsRenderer extends RendererBase {
+
+  @Override
+  public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {
+
+    final AbstractUIButtons buttons = (AbstractUIButtons) component;
+    final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+
+    writer.startElement(HtmlElements.DIV);
+    writer.writeIdAttribute(buttons.getClientId(facesContext));
+      writer.writeClassAttribute(BootstrapClass.BTN_GROUP, BootstrapClass.NAVBAR_NAV);
+      writer.writeAttribute(HtmlAttributes.ROLE, HtmlRoleValues.GROUP.toString(), false);
+    writer.writeClassAttribute(Classes.create(buttons), buttons.getCustomClass(), BootstrapClass.BTN_TOOLBAR);
+    writer.writeStyleAttribute(buttons.getStyle());
+    HtmlRendererUtils.writeDataAttributes(facesContext, writer, buttons);
+    if (buttons.getTip() != null) {
+      writer.writeAttribute(HtmlAttributes.TITLE, buttons.getTip(), true);
+    }
+  }
+
+  @Override
+  public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
+    final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+    writer.endElement(HtmlElements.DIV);
+  }
+}

Modified: myfaces/tobago/trunk/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/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandRenderer.java?rev=1745611&r1=1745610&r2=1745611&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandRenderer.java Thu May 26 14:29:14 2016
@@ -19,6 +19,46 @@
 
 package org.apache.myfaces.tobago.renderkit.html.standard.standard.tag;
 
+import org.apache.myfaces.tobago.internal.component.AbstractUICommand;
+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.context.FacesContext;
+import java.io.IOException;
+
 public class CommandRenderer extends CommandRendererBase {
 
+  @Override
+  protected void encodeBeginElement(final FacesContext facesContext, final AbstractUICommand command)
+      throws IOException {
+    final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+    writer.startElement(HtmlElements.A);
+  }
+
+  @Override
+  protected void encodeEndElement(final FacesContext facesContext, final AbstractUICommand command)
+      throws IOException {
+    final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+    writer.endElement(HtmlElements.A);
+  }
+
+  @Override
+  protected void encodeBeginOuter(final FacesContext facesContext, final AbstractUICommand command)
+      throws IOException {
+    final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+
+//    writer.startElement(HtmlElements.SPAN);
+    // XXX this class fixes the problem, that the submenu are not opened at correct position, but
+    // the name doesn't suggest, that it is correct.
+//    writer.writeClassAttribute(BootstrapClass.BTN_GROUP);
+  }
+
+  @Override
+  protected void encodeEndOuter(final FacesContext facesContext, final AbstractUICommand command)
+      throws IOException {
+    final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+
+//    writer.endElement(HtmlElements.SPAN);
+  }
 }

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandRendererBase.java?rev=1745611&r1=1745610&r2=1745611&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandRendererBase.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandRendererBase.java Thu May 26 14:29:14 2016
@@ -53,7 +53,6 @@ import java.util.List;
 public abstract class CommandRendererBase extends RendererBase {
 
   private static final Logger LOG = LoggerFactory.getLogger(CommandRendererBase.class);
-  private CssItem cssItems;
 
   @Override
   public void decode(final FacesContext facesContext, final UIComponent component) {
@@ -85,6 +84,10 @@ public abstract class CommandRendererBas
 
     final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
 
+    if (command.isParentOfCommands()) {
+      encodeBeginOuter(facesContext, command);
+    }
+
     encodeBeginElement(facesContext, command);
     writer.writeIdAttribute(clientId);
     writer.writeNameAttribute(clientId);
@@ -114,21 +117,26 @@ public abstract class CommandRendererBas
     HtmlRendererUtils.writeDataAttributes(facesContext, writer, command);
     writer.writeStyleAttribute(command.getStyle());
 
+    final List<CssItem> cssItems = new ArrayList<CssItem>();
     if (command.isParentOfCommands()) {
-      // XXX BootstrapClass.NAV_LINK should only be shown inside of UINav or UIButtonGroup
-      writer.writeClassAttribute(BootstrapClass.DROPDOWN_TOGGLE, BootstrapClass.NAV_LINK); // todo: CSS classes
+      // XXX BootstrapClass.NAV_LINK should only be shown inside of UICommands or UIButtons
+      cssItems.add(BootstrapClass.DROPDOWN_TOGGLE);
+      cssItems.add(BootstrapClass.NAV_LINK);
       writer.writeAttribute(DataAttributes.TOGGLE, "dropdown", false);
-    } else {
-      final List<CssItem> cssItems = new ArrayList<CssItem>();
-      cssItems.add(command.getCustomClass());
-      addCssItems(facesContext, command, cssItems);
-      writer.writeClassAttribute(Classes.create(command), cssItems.toArray(new CssItem[cssItems.size()]));
     }
+    cssItems.add(command.getCustomClass());
+    addCssItems(facesContext, command, cssItems);
     final String title = HtmlRendererUtils.getTitleFromTipAndMessages(facesContext, command);
     if (title != null) {
       writer.writeAttribute(HtmlAttributes.TITLE, title, true);
     }
 
+    cssItems.add(command.getCustomClass());
+
+    writer.writeClassAttribute(
+        Classes.create(command),
+        cssItems.toArray(new CssItem[cssItems.size()]));
+
     final boolean defaultCommand = ComponentUtils.getBooleanAttribute(command, Attributes.defaultCommand);
     if (defaultCommand) {
       final AbstractUIForm form = ComponentUtils.findAncestor(command, AbstractUIForm.class);
@@ -202,26 +210,29 @@ public abstract class CommandRendererBas
   @Override
   public void encodeEnd(final FacesContext facesContext, final UIComponent component) throws IOException {
 
-    final AbstractUICommand link = (AbstractUICommand) component;
+    final AbstractUICommand command = (AbstractUICommand) component;
 
-    if (link.isParentOfCommands()) {
+    if (command.isParentOfCommands()) {
       final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
       writer.endElement(HtmlElements.UL);
     }
 
+    if (command.isParentOfCommands()) {
+      encodeEndOuter(facesContext, command);
+    }
   }
 
-  protected void encodeBeginElement(final FacesContext facesContext, final AbstractUICommand command)
-      throws IOException {
-    final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
-    writer.startElement(HtmlElements.A);
-  }
+  abstract protected void encodeBeginElement(final FacesContext facesContext, final AbstractUICommand command)
+      throws IOException;
 
-  protected void encodeEndElement(final FacesContext facesContext, final AbstractUICommand command)
-      throws IOException {
-    final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
-    writer.endElement(HtmlElements.A);
-  }
+  abstract protected void encodeEndElement(final FacesContext facesContext, final AbstractUICommand command)
+      throws IOException;
+
+  abstract protected void encodeBeginOuter(final FacesContext facesContext, final AbstractUICommand command)
+      throws IOException;
+
+  abstract protected void encodeEndOuter(final FacesContext facesContext, final AbstractUICommand command)
+      throws IOException;
 
   protected void commandActivated(final UIComponent component) {
     component.queueEvent(new ActionEvent(component));

Copied: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandsRenderer.java (from r1741237, myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandGroupRenderer.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandsRenderer.java?p2=myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandsRenderer.java&p1=myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandGroupRenderer.java&r1=1741237&r2=1745611&rev=1745611&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandGroupRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandsRenderer.java Thu May 26 14:29:14 2016
@@ -19,13 +19,11 @@
 
 package org.apache.myfaces.tobago.renderkit.html.standard.standard.tag;
 
-import org.apache.myfaces.tobago.component.UINav;
+import org.apache.myfaces.tobago.internal.component.AbstractUICommands;
 import org.apache.myfaces.tobago.internal.component.AbstractUIForm;
 import org.apache.myfaces.tobago.renderkit.RendererBase;
 import org.apache.myfaces.tobago.renderkit.css.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.util.ComponentUtils;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
@@ -34,25 +32,15 @@ import javax.faces.component.UIComponent
 import javax.faces.context.FacesContext;
 import java.io.IOException;
 
-public class CommandGroupRenderer extends RendererBase {
+public class CommandsRenderer extends RendererBase {
 
   @Override
   public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {
-    final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
-
-    // fixme: only a temporary workaround
-    final UINav nav = ComponentUtils.findAncestor(component, UINav.class);
 
-    if (nav == null) {
-      writer.startElement(HtmlElements.DIV);
-      writer.writeClassAttribute(BootstrapClass.BTN_GROUP, BootstrapClass.NAVBAR_NAV);
-      writer.writeIdAttribute(component.getClientId(facesContext));
-      writer.writeAttribute(HtmlAttributes.ROLE, HtmlRoleValues.GROUP.toString(), false);
-    } else {
-      writer.startElement(HtmlElements.UL);
-      writer.writeClassAttribute(BootstrapClass.NAV, BootstrapClass.NAVBAR_NAV);
-      writer.writeIdAttribute(component.getClientId(facesContext));
-    }
+    final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+    writer.startElement(HtmlElements.UL);
+    writer.writeClassAttribute(BootstrapClass.NAV, BootstrapClass.NAVBAR_NAV);
+    writer.writeIdAttribute(component.getClientId(facesContext));
   }
 
   @Override
@@ -70,15 +58,11 @@ public class CommandGroupRenderer extend
           encodeChildren(facesContext, child);
         } else {
           // fixme: only a temporary workaround
-          final UINav nav = ComponentUtils.findAncestor(component, UINav.class);
-          if (nav == null) {
-            child.encodeAll(facesContext);
-          } else {
-            writer.startElement(HtmlElements.LI);
-            writer.writeClassAttribute(BootstrapClass.NAV_ITEM, BootstrapClass.DROPDOWN);
-            child.encodeAll(facesContext);
-            writer.endElement(HtmlElements.LI);
-          }
+          final AbstractUICommands commands = ComponentUtils.findAncestor(component, AbstractUICommands.class);
+          writer.startElement(HtmlElements.LI);
+          writer.writeClassAttribute(BootstrapClass.NAV_ITEM, BootstrapClass.DROPDOWN);
+          child.encodeAll(facesContext);
+          writer.endElement(HtmlElements.LI);
         }
       }
     }
@@ -87,12 +71,6 @@ public class CommandGroupRenderer extend
   @Override
   public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
     final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
-    // fixme: only a temporary workaround
-    final UINav nav = ComponentUtils.findAncestor(component, UINav.class);
-    if (nav == null) {
-      writer.endElement(HtmlElements.DIV);
-    } else {
-      writer.endElement(HtmlElements.UL);
-    }
+    writer.endElement(HtmlElements.UL);
   }
 }

Modified: myfaces/tobago/trunk/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/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/HeaderRenderer.java?rev=1745611&r1=1745610&r2=1745611&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/HeaderRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/HeaderRenderer.java Thu May 26 14:29:14 2016
@@ -47,7 +47,7 @@ public class HeaderRenderer extends Rend
         BootstrapClass.NAVBAR, /*BootstrapClass.NAVBAR_DARK, BootstrapClass.BG_INVERSE,*/
         header.isFixed() ? BootstrapClass.NAVBAR_FIXED_TOP : null,
         header.getCustomClass());
-// TBD: should NAVBAR class be in the NavRenderer?
+// TBD: should NAVBAR class be in the CommandsRenderer?
     writer.writeAttribute(HtmlAttributes.TITLE, header.getTip(), true);
     writer.writeStyleAttribute(header.getStyle());
     HtmlRendererUtils.writeDataAttributes(facesContext, writer, header);

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ImageRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ImageRenderer.java?rev=1745611&r1=1745610&r2=1745611&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ImageRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ImageRenderer.java Thu May 26 14:29:14 2016
@@ -21,11 +21,9 @@ package org.apache.myfaces.tobago.render
 
 import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.component.UICommand;
-import org.apache.myfaces.tobago.component.UINav;
 import org.apache.myfaces.tobago.context.ResourceManagerUtils;
 import org.apache.myfaces.tobago.internal.component.AbstractUIImage;
 import org.apache.myfaces.tobago.renderkit.RendererBase;
-import org.apache.myfaces.tobago.renderkit.css.BootstrapClass;
 import org.apache.myfaces.tobago.renderkit.css.Classes;
 import org.apache.myfaces.tobago.renderkit.css.FontAwesomeIconEncoder;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
@@ -85,12 +83,7 @@ public class ImageRenderer extends Rende
       if (title != null) {
         writer.writeAttribute(HtmlAttributes.TITLE, title, true);
       }
-      // todo: may set a marker in the context in the
-      // todo: NavRenderer, or the additional class, to avoid tree traversing
-      writer.writeClassAttribute(
-          Classes.create(image),
-          ComponentUtils.findAncestor(image, UINav.class) != null ? BootstrapClass.NAVBAR_BRAND : null,
-          image.getCustomClass());
+      writer.writeClassAttribute(Classes.create(image), image.getCustomClass());
       writer.writeStyleAttribute(image.getStyle());
       writer.endElement(HtmlElements.IMG);
     }

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/LabelLayoutRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/LabelLayoutRendererBase.java?rev=1745611&r1=1745610&r2=1745611&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/LabelLayoutRendererBase.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/LabelLayoutRendererBase.java Thu May 26 14:29:14 2016
@@ -126,8 +126,8 @@ public abstract class LabelLayoutRendere
     // todo: check if BootstrapClass.FORM_GROUP is needed, I've removed it, because of it's margin-bottom: 15px;
     // todo: so we lost too much space
     // todo: without it, e. g. an input field in the header will not be layouted correctly
-//    CssItem extra = ComponentUtils.findAncestor(component, UINav.class) != null ? BootstrapClass.FORM_GROUP : null;
-    // TODO: optimize findAncestor() -> set a marker in UINav?
+//    CssItem extra = ComponentUtils.findAncestor(component, AbstractUICommands.class) != null ? BootstrapClass.FORM_GROUP : null;
+    // TODO: optimize findAncestor() -> set a marker in AbstractUICommands?
 
 //    writer.writeClassAttribute(divClass, extra, BootstrapClass.maximumSeverity(component));
     writer.writeClassAttribute(

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/LinkRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/LinkRenderer.java?rev=1745611&r1=1745610&r2=1745611&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/LinkRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/LinkRenderer.java Thu May 26 14:29:14 2016
@@ -19,6 +19,5 @@
 
 package org.apache.myfaces.tobago.renderkit.html.standard.standard.tag;
 
-public class LinkRenderer extends CommandRendererBase {
-
+public class LinkRenderer extends CommandRenderer {
 }