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/06/01 15:14:47 UTC
svn commit: r1746477 - in /myfaces/tobago/trunk:
tobago-core/src/main/java/org/apache/myfaces/tobago/component/
tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/
tobago-core/src/test/java/org/apache/myfaces/tobago/component...
Author: lofwyr
Date: Wed Jun 1 15:14:47 2016
New Revision: 1746477
URL: http://svn.apache.org/viewvc?rev=1746477&view=rev
Log:
TOBAGO-1529: Navbar, Toolbar, Menu, etc. for Bootstrap
* "bar" facet for tc:tab and tc:box
Added:
myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/FacetsUnitTest.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/internal/taglib/component/BoxTagDeclaration.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/PageTagDeclaration.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TabTagDeclaration.java
myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/10-box/box.xhtml
myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/070-tab/tab.xhtml
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BoxRenderer.java
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PageRenderer.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/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css
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=1746477&r1=1746476&r2=1746477&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 Wed Jun 1 15:14:47 2016
@@ -23,6 +23,7 @@ public enum Facets {
after,
action,
+ bar,
before,
brand,
change,
@@ -40,6 +41,10 @@ public enum Facets {
@Deprecated
layout,
layoutDefault,
+ /**
+ * @deprecated since 3.0.0. Menu bar is no longer supported.
+ */
+ @Deprecated
menuBar,
pagerPage,
pagerPageDirect,
@@ -53,6 +58,7 @@ public enum Facets {
public static final String AFTER = "after";
public static final String ACTION = "action";
+ public static final String BAR = "bar";
public static final String BEFORE = "before";
public static final String BRAND = "brand";
public static final String CHANGE = "change";
@@ -70,7 +76,11 @@ public enum Facets {
@Deprecated
public static final String LAYOUT = "layout";
public static final String LAYOUT_DEFAULT = "layoutDefault";
- public static final String MENUBAR = "menuBar";
+ /**
+ * @deprecated since 3.0.0. Menu bar is no longer supported.
+ */
+ @Deprecated
+ public static final String MENU_BAR = "menuBar";
public static final String PAGER_PAGE = "pagerPage";
public static final String PAGER_PAGE_DIRECT = "pagerPageDirect";
public static final String PAGER_ROW = "pagerRow";
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/BoxTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/BoxTagDeclaration.java?rev=1746477&r1=1746476&r2=1746477&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/BoxTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/BoxTagDeclaration.java Wed Jun 1 15:14:47 2016
@@ -43,9 +43,14 @@ import javax.faces.component.UIPanel;
componentFamily = UIPanel.COMPONENT_FAMILY,
rendererType = RendererTypes.BOX,
facets = {
- @Facet(name = Facets.TOOL_BAR, description = "Contains an instance of UIToolBar",
+ @Facet(name = Facets.BAR,
+ description = "Contains some code to be placed in the header at the bar position."),
+ @Facet(name = Facets.LABEL,
+ description = "Contains some code to be placed in the header at the label position."),
+ @Facet(name = Facets.TOOL_BAR, description = "Deprecated! Contains an instance of UIToolBar",
allowedChildComponenents = "org.apache.myfaces.tobago.ToolBar"),
- @Facet(name=Facets.LAYOUT, description = "Deprecated. Contains an layout manager. "
+ @Facet(name = Facets.MENU_BAR, description = "Deprecated!"),
+ @Facet(name=Facets.LAYOUT, description = "Deprecated! Contains an layout manager. "
+ "The layout manager tag should surround the content instead.")})
public interface BoxTagDeclaration
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/PageTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/PageTagDeclaration.java?rev=1746477&r1=1746476&r2=1746477&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/PageTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/PageTagDeclaration.java Wed Jun 1 15:14:47 2016
@@ -51,9 +51,10 @@ import javax.faces.component.UIForm;
description ="Contains an instance of UICommand which will be executed when the"
+ "size of the user agent was changed. Typically a <tc:command immediate='true' />",
allowedChildComponenents = {"org.apache.myfaces.tobago.Command", "org.apache.myfaces.tobago.Form"}),
- @Facet(name = Facets.MENUBAR, description = "Menubar",
+ @Facet(name = Facets.MENU_BAR, description = "Deprecated! Please consult the demo how to build a "
+ + "menu bar on the top of the page.",
allowedChildComponenents = "javax.faces.component.UIPanel"), //fake
- @Facet(name=Facets.LAYOUT, description = "Deprecated. Contains an layout manager. "
+ @Facet(name=Facets.LAYOUT, description = "Deprecated! Contains an layout manager. "
+ "The layout manager tag should surround the content instead.")})
public interface PageTagDeclaration
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TabTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TabTagDeclaration.java?rev=1746477&r1=1746476&r2=1746477&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TabTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TabTagDeclaration.java Wed Jun 1 15:14:47 2016
@@ -48,7 +48,9 @@ import javax.faces.component.UIPanel;
componentFamily = UIPanel.COMPONENT_FAMILY,
rendererType = RendererTypes.TAB,
facets = {
- @Facet(name = Facets.TOOL_BAR, description = "Contains an instance of UIToolBar",
+ @Facet(name = Facets.BAR,
+ description = "Contains some code to be placed in the header at the bar position."),
+ @Facet(name = Facets.TOOL_BAR, description = "Deprecated! Contains an instance of UIToolBar",
allowedChildComponenents = "org.apache.myfaces.tobago.ToolBar")})
public interface TabTagDeclaration
extends HasIdBindingAndRendered, IsVisual, HasLabelAndAccessKey, HasTip, IsDisabled, HasImage {
Added: myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/FacetsUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/FacetsUnitTest.java?rev=1746477&view=auto
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/FacetsUnitTest.java (added)
+++ myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/FacetsUnitTest.java Wed Jun 1 15:14:47 2016
@@ -0,0 +1,13 @@
+package org.apache.myfaces.tobago.component;
+
+import org.apache.myfaces.tobago.util.EnumUnitTest;
+import org.junit.Test;
+
+public class FacetsUnitTest extends EnumUnitTest {
+
+ @Test
+ public void testNames() throws IllegalAccessException, NoSuchFieldException {
+ testNames(Facets.class);
+ }
+
+}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/10-box/box.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/10-box/box.xhtml?rev=1746477&r1=1746476&r2=1746477&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/10-box/box.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/10-box/box.xhtml Wed Jun 1 15:14:47 2016
@@ -44,15 +44,19 @@
</tc:segmentLayout>
</tc:section>
- <tc:section label="Toolbar">
- <p>It's possible to add a toobar to the header of a contentbox. For that, the contentbox must contain the tag
- <code class="language-markup"><f:facet name="toolBar"></code>. The facet contain the
- <code class="language-markup"><tc:toolBar></code> tag.</p>
+ <tc:section label="Bar">
+ <p>It's possible to add a bar to the header of a content box. For that, the content box must contain the tag
+ <code class="language-markup"><f:facet name="bar"></code>. The facet may contain
+ <code class="language-markup"><tc:bar></code> or other suitable tags.</p>
<tc:box>
- <f:facet name="toolBar">
- <tc:toolBar>
- <tc:toolBarCommand label="Toolbar Entry"/>
- </tc:toolBar>
+ <f:facet name="label">
+ Label
+ </f:facet>
+ <f:facet name="bar">
+ <tc:buttons>
+ <tc:button label="Button 1"/>
+ <tc:button label="Button 2"/>
+ </tc:buttons>
</f:facet>
Content
</tc:box>
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/070-tab/tab.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/070-tab/tab.xhtml?rev=1746477&r1=1746476&r2=1746477&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/070-tab/tab.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/070-tab/tab.xhtml Wed Jun 1 15:14:47 2016
@@ -20,7 +20,7 @@
<ui:composition template="/main.xhtml"
xmlns="http://www.w3.org/1999/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="#{overviewBundle.tab}"/>
<p>A <code class="language-markup"><tc:tabGroup/></code> can contain several
<code class="language-markup"><tc:tab/></code> tags.
@@ -59,6 +59,11 @@
<p>Content of tab one.</p>
</tc:tab>
<tc:tab label="Tab Two">
+ <f:facet name="bar">
+ <tc:link image="fa-remove">
+ <tc:dataAttribute name="alert-text" value="Not implemented yet!"/>
+ </tc:link>
+ </f:facet>
<p>Content of tab two.</p>
</tc:tab>
</tc:tabGroup>
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BoxRenderer.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/BoxRenderer.java?rev=1746477&r1=1746476&r2=1746477&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BoxRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BoxRenderer.java Wed Jun 1 15:14:47 2016
@@ -21,6 +21,7 @@ package org.apache.myfaces.tobago.render
import org.apache.myfaces.tobago.component.Facets;
import org.apache.myfaces.tobago.component.UIBox;
import org.apache.myfaces.tobago.component.UIMenuBar;
+import org.apache.myfaces.tobago.internal.util.Deprecation;
import org.apache.myfaces.tobago.renderkit.RendererBase;
import org.apache.myfaces.tobago.renderkit.css.BootstrapClass;
import org.apache.myfaces.tobago.renderkit.css.Classes;
@@ -40,76 +41,81 @@ import java.io.IOException;
public class BoxRenderer extends RendererBase {
- private static final Logger LOG = LoggerFactory.getLogger(BoxRenderer.class);
+ private static final Logger LOG = LoggerFactory.getLogger(BoxRenderer.class);
- @Override
- public void encodeBegin(final FacesContext facesContext, final UIComponent component) throws IOException {
+ @Override
+ public void encodeBegin(final FacesContext facesContext, final UIComponent component) throws IOException {
- final UIBox box = (UIBox) component;
- final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+ final UIBox box = (UIBox) component;
+ final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
- final UIComponent label = ComponentUtils.getFacet(box, Facets.label);
- final String labelString = box.getLabel();
-
- final UIPanel toolbar = (UIPanel) ComponentUtils.getFacet(box, Facets.toolBar); //XXX todo
-
- writer.startElement(HtmlElements.DIV);
- writer.writeClassAttribute(
- Classes.create(box), BootstrapClass.CARD, box.getCustomClass());
- writer.writeIdAttribute(box.getClientId(facesContext));
- final String title = HtmlRendererUtils.getTitleFromTipAndMessages(facesContext, box);
- if (title != null) {
- writer.writeAttribute(HtmlAttributes.TITLE, title, true);
- }
- HtmlRendererUtils.writeDataAttributes(facesContext, writer, box);
- writer.writeStyleAttribute(box.getStyle());
-
- if (label != null || labelString != null || toolbar != null) {
- writer.startElement(HtmlElements.DIV);
- writer.writeClassAttribute(BootstrapClass.CARD_HEADER);
-
- writer.startElement(HtmlElements.H3);
- if (label != null) {
- RenderUtils.encode(facesContext, label);
- } else if (labelString != null) {
- writer.writeText(labelString);
- }
- writer.endElement(HtmlElements.H3);
-
- if (toolbar != null) {
- RenderUtils.encode(facesContext, toolbar);
- }
-
- writer.endElement(HtmlElements.DIV);
- }
-
- final UIMenuBar menuBar = ComponentUtils.findFacetDescendant(box, Facets.menuBar, UIMenuBar.class);
- if (menuBar != null) {
- RenderUtils.encode(facesContext, menuBar);
- }
-
- writer.startElement(HtmlElements.DIV);
- writer.writeClassAttribute(BootstrapClass.CARD_BLOCK);
+ final UIComponent label = ComponentUtils.getFacet(box, Facets.label);
+ final String labelString = box.getLabel();
+ final UIPanel toolbar = (UIPanel) ComponentUtils.getFacet(box, Facets.toolBar);
+ final UIComponent bar = ComponentUtils.getFacet(box, Facets.bar);
+
+ writer.startElement(HtmlElements.DIV);
+ writer.writeClassAttribute(Classes.create(box), BootstrapClass.CARD, box.getCustomClass());
+ writer.writeIdAttribute(box.getClientId(facesContext));
+ final String title = HtmlRendererUtils.getTitleFromTipAndMessages(facesContext, box);
+ if (title != null) {
+ writer.writeAttribute(HtmlAttributes.TITLE, title, true);
}
+ HtmlRendererUtils.writeDataAttributes(facesContext, writer, box);
+ writer.writeStyleAttribute(box.getStyle());
+
+ if (label != null || labelString != null || bar != null || toolbar != null) {
+ writer.startElement(HtmlElements.DIV);
+ writer.writeClassAttribute(BootstrapClass.CARD_HEADER);
+
+ writer.startElement(HtmlElements.H3);
+ if (label != null) {
+ RenderUtils.encode(facesContext, label);
+ } else if (labelString != null) {
+ writer.writeText(labelString);
+ }
+ writer.endElement(HtmlElements.H3);
+
+ if (toolbar != null) {
+ Deprecation.LOG.warn("Facet {} is deprecated for <tc:box>", Facets.toolBar.name());
+ RenderUtils.encode(facesContext, toolbar);
+ }
+
+ if (bar != null) {
+ RenderUtils.encode(facesContext, bar);
+ }
- @Override
- public boolean getRendersChildren() {
- return true;
+ writer.endElement(HtmlElements.DIV);
}
- @Override
- public void encodeChildren(final FacesContext facesContext, final UIComponent component) throws IOException {
- if (component instanceof UIBox && ((UIBox) component).isCollapsed()) {
- return;
- }
- super.encodeChildren(facesContext, component);
+ final UIMenuBar menuBar = ComponentUtils.findFacetDescendant(box, Facets.menuBar, UIMenuBar.class);
+ if (menuBar != null) {
+ Deprecation.LOG.warn("Facet {} is deprecated for <tc:box>", Facets.menuBar.name());
+ RenderUtils.encode(facesContext, menuBar);
}
- @Override
- public void encodeEnd(final FacesContext facesContext, final UIComponent component) throws IOException {
- final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
- writer.endElement(HtmlElements.DIV);
- writer.endElement(HtmlElements.DIV);
+ writer.startElement(HtmlElements.DIV);
+ writer.writeClassAttribute(BootstrapClass.CARD_BLOCK);
+ }
+
+ @Override
+ public boolean getRendersChildren() {
+ return true;
+ }
+
+ @Override
+ public void encodeChildren(final FacesContext facesContext, final UIComponent component) throws IOException {
+ if (component instanceof UIBox && ((UIBox) component).isCollapsed()) {
+ return;
}
+ super.encodeChildren(facesContext, component);
+ }
+
+ @Override
+ public void encodeEnd(final FacesContext facesContext, final UIComponent component) throws IOException {
+ final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+ writer.endElement(HtmlElements.DIV);
+ 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/PageRenderer.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/PageRenderer.java?rev=1746477&r1=1746476&r2=1746477&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PageRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PageRenderer.java Wed Jun 1 15:14:47 2016
@@ -21,6 +21,8 @@ package org.apache.myfaces.tobago.render
import org.apache.myfaces.tobago.application.ProjectStage;
import org.apache.myfaces.tobago.component.Attributes;
+import org.apache.myfaces.tobago.component.Facets;
+import org.apache.myfaces.tobago.component.UIMenuBar;
import org.apache.myfaces.tobago.component.UIPage;
import org.apache.myfaces.tobago.component.UIPopup;
import org.apache.myfaces.tobago.config.TobagoConfig;
@@ -30,6 +32,7 @@ import org.apache.myfaces.tobago.context
import org.apache.myfaces.tobago.context.Theme;
import org.apache.myfaces.tobago.internal.component.AbstractUIPage;
import org.apache.myfaces.tobago.internal.util.AccessKeyLogger;
+import org.apache.myfaces.tobago.internal.util.Deprecation;
import org.apache.myfaces.tobago.internal.util.FacesContextUtils;
import org.apache.myfaces.tobago.internal.util.MimeTypeUtils;
import org.apache.myfaces.tobago.internal.util.ResponseUtils;
@@ -94,6 +97,11 @@ public class PageRenderer extends Render
final UIPage page = (UIPage) component;
final TobagoConfig tobagoConfig = TobagoConfig.getInstance(facesContext);
+ final UIMenuBar menuBar = ComponentUtils.findFacetDescendant(page, Facets.menuBar, UIMenuBar.class);
+ if (menuBar != null) {
+ Deprecation.LOG.error("Facet {} is deprecated for <tc:page>", Facets.menuBar.name());
+ }
+
if (FacesContextUtils.getFocusId(facesContext) == null && !StringUtils.isBlank(page.getFocusId())) {
FacesContextUtils.setFocusId(facesContext, page.getFocusId());
}
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TabGroupRenderer.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/TabGroupRenderer.java?rev=1746477&r1=1746476&r2=1746477&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TabGroupRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TabGroupRenderer.java Wed Jun 1 15:14:47 2016
@@ -33,6 +33,7 @@ import org.apache.myfaces.tobago.context
import org.apache.myfaces.tobago.event.TabChangeEvent;
import org.apache.myfaces.tobago.internal.component.AbstractUIPanel;
import org.apache.myfaces.tobago.internal.util.AccessKeyLogger;
+import org.apache.myfaces.tobago.internal.util.Deprecation;
import org.apache.myfaces.tobago.model.SwitchType;
import org.apache.myfaces.tobago.renderkit.LabelWithAccessKey;
import org.apache.myfaces.tobago.renderkit.RendererBase;
@@ -237,9 +238,15 @@ public class TabGroupRenderer extends Re
final UIPanel toolbar = (UIPanel) ComponentUtils.getFacet(tab, Facets.toolBar);
if (toolbar != null) {
+ Deprecation.LOG.warn("Facet {} is deprecated for <tc:box>", Facets.toolBar.name());
renderTabToolbar(facesContext, writer, tab, toolbar);
}
+ final UIComponent bar = ComponentUtils.getFacet(tab, Facets.bar);
+ if (bar != null) {
+ RenderUtils.encode(facesContext, bar);
+ }
+
writer.endElement(HtmlElements.LI);
}
}
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css?rev=1746477&r1=1746476&r2=1746477&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css Wed Jun 1 15:14:47 2016
@@ -20,6 +20,14 @@
* agent: standard
*/
+/* box -------------------------------------------------------------- */
+
+.tobago-box > .card-header {
+ display: flex;
+ justify-content: space-between;
+ align-content: center;
+}
+
/* button -------------------------------------------------------------- */
/* XXX fixes a problem with image in button inside a segmentLayout (with FF40 and IE11)
@@ -570,6 +578,14 @@ table.tobago-sheet-bodyTable>tbody>tr>td
}
/* tree ---------------------------------------------------------------------- */
+
+.tobago-tab {
+ display: flex;
+ justify-content: space-between;
+ align-content: center;
+}
+
+/* tree ---------------------------------------------------------------------- */
.tobago-treeCommand {
cursor: pointer;