myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hno...@apache.org
Subject svn commit: r1790243 - in /myfaces/tobago/branches/TOBAGO-1719: tobago-core/src/main/java/org/apache/myfaces/tobago/component/ tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/ tobago-core/src/main/java/org/apache/myfaces...
Date Wed, 05 Apr 2017 13:20:57 GMT
Author: hnoeth
Date: Wed Apr  5 13:20:56 2017
New Revision: 1790243

URL: http://svn.apache.org/viewvc?rev=1790243&view=rev
Log:
TOBAGO-1721 Optimize HTML output when two renderer are involved
* optimized HTML output for <tc:bar><tc:links>
* <tc:form inline="true"> render the much more defensive class 'd-line' instead of 'form-inline'

Added:
    myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/LinksAlternativeBarRenderer.java
Modified:
    myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/component/RendererTypes.java
    myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/BarRenderer.java
    myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/FormRenderer.java
    myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/LinksRenderer.java
    myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/LinksTagDeclaration.java
    myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/css/BootstrapClass.java
    myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/resources/scss/_tobago.scss
    myfaces/tobago/branches/TOBAGO-1719/tobago-example/tobago-example-demo/src/main/webapp/menu.xhtml

Modified: myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/component/RendererTypes.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/component/RendererTypes.java?rev=1790243&r1=1790242&r2=1790243&view=diff
==============================================================================
--- myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/component/RendererTypes.java
(original)
+++ myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/component/RendererTypes.java
Wed Apr  5 13:20:56 2017
@@ -49,6 +49,7 @@ public enum RendererTypes {
   LinkAlternativeCommand,
   LinkAlternativeLinks,
   Links,
+  LinksAlternativeBar,
   Label,
   Messages,
   Object,
@@ -119,6 +120,7 @@ public enum RendererTypes {
   public static final String LINK_ALTERNATIVE_COMMAND = "LinkAlternativeCommand";
   public static final String LINK_ALTERNATIVE_LINKS = "LinkAlternativeLinks";
   public static final String LINKS = "Links";
+  public static final String LINKS_ALTERNATIVE_BAR = "LinksAlternativeBar";
   public static final String LABEL = "Label";
   public static final String MESSAGES = "Messages";
   public static final String OBJECT = "Object";

Modified: myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/BarRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/BarRenderer.java?rev=1790243&r1=1790242&r2=1790243&view=diff
==============================================================================
--- myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/BarRenderer.java
(original)
+++ myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/BarRenderer.java
Wed Apr  5 13:20:56 2017
@@ -20,14 +20,15 @@
 package org.apache.myfaces.tobago.internal.renderkit.renderer;
 
 import org.apache.myfaces.tobago.component.Facets;
+import org.apache.myfaces.tobago.component.RendererTypes;
 import org.apache.myfaces.tobago.component.UIBar;
-import org.apache.myfaces.tobago.internal.component.AbstractUIFormBase;
+import org.apache.myfaces.tobago.internal.component.AbstractUIForm;
+import org.apache.myfaces.tobago.internal.component.AbstractUILinks;
 import org.apache.myfaces.tobago.internal.util.HtmlRendererUtils;
 import org.apache.myfaces.tobago.internal.util.JQueryUtils;
 import org.apache.myfaces.tobago.internal.util.RenderUtils;
 import org.apache.myfaces.tobago.renderkit.RendererBase;
 import org.apache.myfaces.tobago.renderkit.css.BootstrapClass;
-import org.apache.myfaces.tobago.renderkit.css.CssItemUtils;
 import org.apache.myfaces.tobago.renderkit.css.Icons;
 import org.apache.myfaces.tobago.renderkit.html.Arias;
 import org.apache.myfaces.tobago.renderkit.html.DataAttributes;
@@ -41,8 +42,6 @@ import org.apache.myfaces.tobago.webapp.
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
 
 public class BarRenderer extends RendererBase {
 
@@ -57,19 +56,18 @@ public class BarRenderer extends Rendere
 
     writer.startElement(HtmlElements.NAV);
     writer.writeIdAttribute(clientId);
-    writer.writeClassAttribute(BootstrapClass.NAVBAR, BootstrapClass.NAVBAR_TOGGLEABLE, BootstrapClass.FORM_INLINE);
+    writer.writeClassAttribute(BootstrapClass.NAVBAR, BootstrapClass.NAVBAR_TOGGLEABLE);
     writer.writeAttribute(HtmlAttributes.ROLE, HtmlRoleValues.NAVIGATION.toString(), false);
     HtmlRendererUtils.writeDataAttributes(facesContext, writer, bar);
 
-//    writer.startElement(HtmlElements.DIV);
-//    writer.writeClassAttribute(BootstrapClass.CONTAINER_FLUID);
-
     encodeOpener(facesContext, bar, writer, navbarId);
 
     writer.startElement(HtmlElements.DIV);
     writer.writeIdAttribute(navbarId);
-    writer.writeClassAttribute(BootstrapClass.COLLAPSE, BootstrapClass.NAVBAR_COLLAPSE);
-// XXX writer.writeClassAttribute(BootstrapClass.COLLAPSE, BootstrapClass.NAVBAR_COLLAPSE,
BootstrapClass.NAVBAR_TEXT);
+    writer.writeClassAttribute(
+        BootstrapClass.COLLAPSE,
+        BootstrapClass.NAVBAR_COLLAPSE,
+        BootstrapClass.ALIGN_ITEMS_CENTER);
   }
 
   @Override
@@ -79,28 +77,21 @@ public class BarRenderer extends Rendere
 
   @Override
   public void encodeChildren(FacesContext facesContext, UIComponent component) throws IOException
{
-
-//    final TobagoResponseWriter writer = getResponseWriter(facesContext);
-
-    List<UIComponent> itemsToEncode = new ArrayList<UIComponent>();
-    collectItemsToEncode(component, itemsToEncode);
-    for (final UIComponent child : itemsToEncode) {
-//      writer.startElement(HtmlElements.DIV);
-//      writer.writeClassAttribute(BootstrapClass.FORM_INLINE);
-      CssItemUtils.add(facesContext, BootstrapClass.FORM_INLINE);
-      child.encodeAll(facesContext);
-      CssItemUtils.pop(facesContext);
-//      writer.endElement(HtmlElements.DIV);
+    setRenderTypes(component);
+    for (UIComponent child : component.getChildren()) {
+      if (child.isRendered()) {
+        child.encodeAll(facesContext);
+      }
     }
   }
 
-  private void collectItemsToEncode(final UIComponent component, List<UIComponent>
result) {
+  private void setRenderTypes(UIComponent component) throws IOException {
     for (UIComponent child : component.getChildren()) {
       if (child.isRendered()) {
-        if (child instanceof AbstractUIFormBase) {
-          collectItemsToEncode(child, result);
-        } else {
-          result.add(child);
+        if (child instanceof AbstractUIForm) {
+          setRenderTypes(child);
+        } else if (child instanceof AbstractUILinks) {
+          child.setRendererType(RendererTypes.LINKS_ALTERNATIVE_BAR);
         }
       }
     }
@@ -108,17 +99,26 @@ public class BarRenderer extends Rendere
 
   @Override
   public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException
{
+    final UIBar bar = (UIBar) component;
     final TobagoResponseWriter writer = getResponseWriter(facesContext);
+    final UIComponent after = ComponentUtils.getFacet(bar, Facets.after);
+
+    if (after != null) {
+      writer.startElement(HtmlElements.DIV);
+      writer.writeClassAttribute(BootstrapClass.MY_LG_0, BootstrapClass.ML_AUTO);
+
+      setRenderTypes(after);
+      RenderUtils.encode(facesContext, after);
+
+      writer.endElement(HtmlElements.DIV);
+    }
     writer.endElement(HtmlElements.DIV);
-//    writer.endElement(HtmlElements.DIV);
     writer.endElement(HtmlElements.NAV);
   }
 
   private void encodeOpener(
       FacesContext facesContext, UIBar bar, TobagoResponseWriter writer, String navbarId)
throws IOException {
 
-//    writer.startElement(HtmlElements.DIV);
-
     writer.startElement(HtmlElements.BUTTON);
     writer.writeAttribute(HtmlAttributes.TYPE, HtmlButtonTypes.BUTTON);
     writer.writeClassAttribute(BootstrapClass.NAVBAR_TOGGLER, BootstrapClass.NAVBAR_TOGGLER_RIGHT);
@@ -128,11 +128,6 @@ public class BarRenderer extends Rendere
     writer.writeAttribute(Arias.CONTROLS, navbarId, false);
 
     writer.writeIcon(Icons.BARS);
-/*  tbd: may be use this, like in the Bootstrap documentation (but hasn't worked in my first
try)
-    writer.startElement(HtmlElements.SPAN);
-    writer.writeClassAttribute(BootstrapClass.NAVBAR_TOGGLER_ICON);
-    writer.endElement(HtmlElements.SPAN);
-*/
 
     writer.startElement(HtmlElements.SPAN);
     writer.writeClassAttribute(BootstrapClass.SR_ONLY);
@@ -148,7 +143,5 @@ public class BarRenderer extends Rendere
       RenderUtils.encode(facesContext, brand);
       writer.endElement(HtmlElements.SPAN);
     }
-
-//    writer.endElement(HtmlElements.DIV);
   }
 }

Modified: myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/FormRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/FormRenderer.java?rev=1790243&r1=1790242&r2=1790243&view=diff
==============================================================================
--- myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/FormRenderer.java
(original)
+++ myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/FormRenderer.java
Wed Apr  5 13:20:56 2017
@@ -43,7 +43,7 @@ public class FormRenderer extends Render
     writer.writeIdAttribute(clientId);
     writer.writeClassAttribute(
         TobagoClass.FORM,
-        inline ? BootstrapClass.FORM_INLINE : null);
+        inline ? BootstrapClass.D_INLINE : null);
   }
 
   @Override

Added: myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/LinksAlternativeBarRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/LinksAlternativeBarRenderer.java?rev=1790243&view=auto
==============================================================================
--- myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/LinksAlternativeBarRenderer.java
(added)
+++ myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/LinksAlternativeBarRenderer.java
Wed Apr  5 13:20:56 2017
@@ -0,0 +1,36 @@
+/*
+ * 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.renderkit.renderer;
+
+import org.apache.myfaces.tobago.renderkit.css.BootstrapClass;
+import org.apache.myfaces.tobago.renderkit.css.CssItem;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import java.util.List;
+
+public class LinksAlternativeBarRenderer extends LinksRenderer {
+
+  @Override
+  protected void addCssItems(final FacesContext facesContext, final UIComponent component,
+                             final List<CssItem> collected) {
+    collected.add(BootstrapClass.NAVBAR_NAV);
+  }
+}

Modified: myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/LinksRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/LinksRenderer.java?rev=1790243&r1=1790242&r2=1790243&view=diff
==============================================================================
--- myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/LinksRenderer.java
(original)
+++ myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/LinksRenderer.java
Wed Apr  5 13:20:56 2017
@@ -23,13 +23,16 @@ import org.apache.myfaces.tobago.compone
 import org.apache.myfaces.tobago.internal.component.AbstractUILink;
 import org.apache.myfaces.tobago.renderkit.RendererBase;
 import org.apache.myfaces.tobago.renderkit.css.BootstrapClass;
-import org.apache.myfaces.tobago.renderkit.css.CssItemUtils;
+import org.apache.myfaces.tobago.renderkit.css.Classes;
+import org.apache.myfaces.tobago.renderkit.css.CssItem;
 import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
 
 public class LinksRenderer extends RendererBase {
 
@@ -38,7 +41,12 @@ public class LinksRenderer extends Rende
 
     final TobagoResponseWriter writer = getResponseWriter(facesContext);
     writer.startElement(HtmlElements.UL);
-    writer.writeClassAttribute(BootstrapClass.NAV, null, CssItemUtils.pop(facesContext));
+    final List<CssItem> cssItems = new ArrayList<CssItem>();
+    addCssItems(facesContext, component, cssItems);
+    writer.writeClassAttribute(
+        Classes.create(component),
+        null,
+        cssItems.toArray(new CssItem[cssItems.size()]));
     writer.writeIdAttribute(component.getClientId(facesContext));
   }
 
@@ -71,4 +79,9 @@ public class LinksRenderer extends Rende
     final TobagoResponseWriter writer = getResponseWriter(facesContext);
     writer.endElement(HtmlElements.UL);
   }
+
+  protected void addCssItems(final FacesContext facesContext, final UIComponent component,
+                             final List<CssItem> collected) {
+    collected.add(BootstrapClass.NAV);
+  }
 }

Modified: myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/LinksTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/LinksTagDeclaration.java?rev=1790243&r1=1790242&r2=1790243&view=diff
==============================================================================
--- myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/LinksTagDeclaration.java
(original)
+++ myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/LinksTagDeclaration.java
Wed Apr  5 13:20:56 2017
@@ -37,6 +37,6 @@ import javax.faces.component.UIPanel;
     uiComponentBaseClass = "org.apache.myfaces.tobago.internal.component.AbstractUILinks",
     uiComponentFacesClass = "javax.faces.component.UIPanel",
     componentFamily = UIPanel.COMPONENT_FAMILY,
-    rendererType = RendererTypes.LINKS)
+    rendererType = {RendererTypes.LINKS, RendererTypes.LINKS_ALTERNATIVE_BAR})
 public interface LinksTagDeclaration extends HasIdBindingAndRendered, IsVisual, HasTip {
 }

Modified: myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/css/BootstrapClass.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/css/BootstrapClass.java?rev=1790243&r1=1790242&r2=1790243&view=diff
==============================================================================
--- myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/css/BootstrapClass.java
(original)
+++ myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/css/BootstrapClass.java
Wed Apr  5 13:20:56 2017
@@ -42,6 +42,7 @@ public enum BootstrapClass implements Cs
   ALERT_WARNING("alert-warning"),
   ALERT_INFO("alert-info"),
   ALERT_DISMISSIBLE("alert-dismissible"),
+  ALIGN_ITEMS_CENTER("align-items-center"),
   BG_INVERSE("bg-inverse"),
   BTN("btn"),
   BTN_DANGER("btn-danger"),
@@ -173,12 +174,19 @@ public enum BootstrapClass implements Cs
   INPUT_GROUP_ADDON("input-group-addon"),
   INPUT_GROUP_BTN("input-group-btn"),
   INVISIBLE("invisible"),
+  ML_AUTO("ml-auto"),
   MODAL("modal"),
   MODAL_CONTENT("modal-content"),
   MODAL_DIALOG("modal-dialog"),
   MODAL_LG("modal-lg"),
   MODAL_SM("modal-sm"),
   MR_AUTO("mr-auto"),
+  MY_LG_0("my-lg-0"),
+  MY_LG_1("my-lg-1"),
+  MY_LG_2("my-lg-2"),
+  MY_LG_3("my-lg-3"),
+  MY_LG_4("my-lg-4"),
+  MY_LG_5("my-lg-5"),
   NAV("nav"),
   NAV_ITEM("nav-item"),
   NAV_LINK("nav-link"),

Modified: myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/resources/scss/_tobago.scss
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/resources/scss/_tobago.scss?rev=1790243&r1=1790242&r2=1790243&view=diff
==============================================================================
--- myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/resources/scss/_tobago.scss (original)
+++ myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/resources/scss/_tobago.scss Wed
Apr  5 13:20:56 2017
@@ -28,10 +28,6 @@ span.dropdown {
   display: inline-flex;
 }
 
-.form-check-label.dropdown-item {
-  padding-left: 1.25rem;
-}
-
 /*
 Todo: check, if this is needed? (It doesn't work with the build system)
 
@@ -348,6 +344,17 @@ button.tobago-link-markup-disabled:hover
   text-decoration: none;
 }
 
+button.nav-link { /* bootstrap don't know button.nav-link*/
+  padding: $nav-link-padding;
+  padding-top: .55em;
+  padding-bottom: .45em;
+}
+
+.navbar-nav button.nav-link {
+  padding-left: 0;
+  padding-right: 0;
+}
+
 /* messages ----------------------------------------------------------- */
 
 .tobago-messages-container {
@@ -966,15 +973,6 @@ fixes missing space, I thinks normal Web
 
 fixme: there is a problem with the selectManyShuttle with this style.
 */
-.navbar button:nth-child(n+2),
-.navbar input:nth-child(n+2) {
-  margin-left: 5px;
-}
-
-.tobago-button > *:nth-child(n+2),
-.tobago-link > *:nth-child(n+2) {
-  margin-left: .4em;
-}
 
 .tobago-label {
   width: 155px;

Modified: myfaces/tobago/branches/TOBAGO-1719/tobago-example/tobago-example-demo/src/main/webapp/menu.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/TOBAGO-1719/tobago-example/tobago-example-demo/src/main/webapp/menu.xhtml?rev=1790243&r1=1790242&r2=1790243&view=diff
==============================================================================
--- myfaces/tobago/branches/TOBAGO-1719/tobago-example/tobago-example-demo/src/main/webapp/menu.xhtml
(original)
+++ myfaces/tobago/branches/TOBAGO-1719/tobago-example/tobago-example-demo/src/main/webapp/menu.xhtml
Wed Apr  5 13:20:56 2017
@@ -36,7 +36,7 @@
         <tc:link image="#{request.contextPath}/image/feather-leaf.png" label="Tobago Demo"
id="brand" link="/"/>
       </f:facet>
 
-      <tc:form id="header" inline="true">
+      <tc:form id="header">
 
         <tc:links id="commands">
 
@@ -108,35 +108,37 @@
         </tc:links>
       </tc:form>
 
-      <!--<tc:flowLayout textAlign="right">-->
-        <tc:form inline="true">
-          <tc:in placeholder="Search"/>
-          <tc:button defaultCommand="true" omit="true" label="go">
-            <tc:dataAttribute name="alert-text"
-                              value="Sorry: Search not implemented"/>
-
-          </tc:button>
-        </tc:form>
-        <tc:form id="navbtns" inline="true">
-          <!--<tc:style customClass="form-inline"/>-->
-          <tc:buttons>
-            <tc:button immediate="true" id="previous"
-                       image="fa-angle-left"
-                       action="#{navigationState.gotoPrevious}"
-                       disabled="#{navigationState.first}"
-                       tip="#{demoBundle.footer_previous}"/>
-            <tc:button immediate="true" id="next"
-                       image="fa-angle-right"
-                       action="#{navigationState.gotoNext}"
-                       disabled="#{navigationState.last}"
-                       tip="#{demoBundle.footer_next}"/>
-          </tc:buttons>
-          <tc:button action="#{navigationState.toggleViewSource}"
-                     image="fa-code"
-                     immediate="true" tip="#{demoBundle.footer_viewSource}"/>
-        </tc:form>
-      <!--</tc:flowLayout>-->
-
+      <f:facet name="after">
+        <tc:flexLayout columns="auto;auto">
+          <tc:form>
+            <tc:flexLayout columns="200px;auto">
+              <tc:in placeholder="Search" labelLayout="skip"/>
+              <tc:button defaultCommand="true" omit="true" label="go">
+                <tc:dataAttribute name="alert-text" value="Sorry: Search not implemented"/>
+              </tc:button>
+            </tc:flexLayout>
+          </tc:form>
+          <tc:form id="navbtns">
+            <tc:flexLayout columns="auto;auto">
+              <tc:buttons>
+                <tc:button immediate="true" id="previous"
+                           image="fa-angle-left"
+                           action="#{navigationState.gotoPrevious}"
+                           disabled="#{navigationState.first}"
+                           tip="#{demoBundle.footer_previous}"/>
+                <tc:button immediate="true" id="next"
+                           image="fa-angle-right"
+                           action="#{navigationState.gotoNext}"
+                           disabled="#{navigationState.last}"
+                           tip="#{demoBundle.footer_next}"/>
+              </tc:buttons>
+              <tc:button action="#{navigationState.toggleViewSource}"
+                         image="fa-code"
+                         immediate="true" tip="#{demoBundle.footer_viewSource}"/>
+            </tc:flexLayout>
+          </tc:form>
+        </tc:flexLayout>
+      </f:facet>
     </tc:bar>
 
 <!--



Mime
View raw message