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/01/13 16:14:54 UTC
svn commit: r1724439 - in /myfaces/tobago/branches/tobago-3.0.x:
tobago-example/tobago-example-demo/src/main/webapp/content/01-basic/02/
tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/
Author: lofwyr
Date: Wed Jan 13 15:14:54 2016
New Revision: 1724439
URL: http://svn.apache.org/viewvc?rev=1724439&view=rev
Log:
TOBAGO-1488 Toolbar for tc:box in Bootstrap
Modified:
myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/01-basic/02/container.xhtml
myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BoxRenderer.java
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/01-basic/02/container.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/01-basic/02/container.xhtml?rev=1724439&r1=1724438&r2=1724439&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/01-basic/02/container.xhtml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/01-basic/02/container.xhtml Wed Jan 13 15:14:54 2016
@@ -29,4 +29,17 @@
</tc:box>
<tc:box label="Box (no height set)"/>
</tc:segmentLayout>
+
+ <tc:segmentLayout medium="12">
+ <tc:box label="Box with toolbar">
+ <f:facet name="toolBar">
+ <tc:toolBar>
+ <tc:toolBarCommand id="button1" label="Button 1"/>
+ <tc:toolBarCommand id="button2" label="Button 2"/>
+ </tc:toolBar>
+ </f:facet>
+
+ Content
+ </tc:box>
+ </tc:segmentLayout>
</ui:composition>
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BoxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BoxRenderer.java?rev=1724439&r1=1724438&r2=1724439&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BoxRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BoxRenderer.java Wed Jan 13 15:14:54 2016
@@ -52,9 +52,6 @@ public class BoxRenderer extends BoxRend
final String labelString = box.getLabel();
final UIPanel toolbar = (UIPanel) box.getFacet(Facets.TOOL_BAR); //XXX todo
- if (toolbar != null) {
- LOG.error("XXX toolbar for bootstrap not yet implemented");
- }
writer.startElement(HtmlElements.DIV);
writer.writeClassAttribute(
@@ -80,14 +77,16 @@ public class BoxRenderer extends BoxRend
}
writer.endElement(HtmlElements.H3);
+ if (toolbar != null) {
+ RenderUtils.encode(facesContext, toolbar);
+ }
+
writer.endElement(HtmlElements.DIV);
}
-// XXX todo
final UIMenuBar menuBar = ComponentUtils.findFacetDescendant(box, Facets.MENUBAR, UIMenuBar.class);
if (menuBar != null) {
- LOG.error("XXX menuBar for bootstrap not yet implemented");
-// RenderUtils.encode(facesContext, menuBar);
+ RenderUtils.encode(facesContext, menuBar);
}
writer.startElement(HtmlElements.DIV);