Author: artdaw
Date: 2011-01-13 14:31:58 -0500 (Thu, 13 Jan 2011)
New Revision: 21003
Modified:
trunk/examples/output-demo/src/main/webapp/examples/toolbar.xhtml
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ToolbarRendererBase.java
Log:
RF-10210: Character entity reference is replaced with numeric
"\u00a0" since it brakes XHTML
Modified: trunk/examples/output-demo/src/main/webapp/examples/toolbar.xhtml
===================================================================
--- trunk/examples/output-demo/src/main/webapp/examples/toolbar.xhtml 2011-01-13 18:01:32
UTC (rev 21002)
+++ trunk/examples/output-demo/src/main/webapp/examples/toolbar.xhtml 2011-01-13 19:31:58
UTC (rev 21003)
@@ -3,77 +3,86 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
-
xmlns:tb="http://richfaces.org/output">
- <h:head>
- <title>toolbar sample</title>
- <style>
-
- </style>
- </h:head>
- <h:body>
- <tb:toolbar height="45" itemSeparator="grid"
itemStyle="color:red;" itemClass="custom-item">
+
xmlns:tb="http://richfaces.org/output"
xmlns:a4j="http://richfaces.org/a4j">
+<f:view contentType="application/xhtml+xml">
+<h:head>
+ <title>toolbar sample</title>
+ <style>
+
+ </style>
+</h:head>
+
+<h:body>
+ <tb:toolbar id="tb" height="45" itemSeparator="grid"
itemStyle="color:red;" itemClass="custom-item">
<f:facet name="itemSeparator">
||
- </f:facet>
- <tb:toolbarGroup itemStyle="border: 1px solid green"
itemClass="custom-item-group" itemSeparator="line"
onitemclick="22">
- <h:graphicImage value="/images/icons/create_doc.gif"/>
- <a href="#">link 1</a> Text
- <a href="#">link 2</a>
- <h:graphicImage value="/images/icons/create_folder.gif"
onclick="q1"/>
- <h:graphicImage value="/images/icons/copy.gif"/>
- <a href="#">link 3</a> Text
- <a href="#">link 4</a>
- </tb:toolbarGroup>
- <tb:toolbarGroup itemSeparator="none">
- <h:graphicImage value="/images/icons/save.gif"
onclick="q2"/>
- <h:graphicImage value="/images/icons/save.gif"
onclick="q2"/>
- <h:graphicImage value="/images/icons/save.gif"
onclick="q2"/>
- <h:graphicImage value="/images/icons/save.gif"
onclick="q2"/>
- </tb:toolbarGroup>
- <tb:toolbarGroup itemSeparator="line">
- <h:graphicImage value="/images/icons/save.gif"
onclick="q2"/>
- <h:graphicImage value="/images/icons/save.gif"
onclick="q2"/>
- </tb:toolbarGroup>
-
- <tb:toolbarGroup location="right"
itemSeparator="square">
- <h:graphicImage value="/images/icons/find.gif" />
- <h:graphicImage value="/images/icons/filter.gif" />
- </tb:toolbarGroup>
- </tb:toolbar>
- <br/>
- <tb:toolbar itemSeparator="grid" itemStyle="border: 1px solid
green" itemClass="custom-item">
- <tb:toolbarGroup itemSeparator="line" itemStyle="border: 1px
solid green" itemClass="custom-item-group">
- <h:graphicImage value="/images/icons/create_doc.gif"/>
- <h:graphicImage value="/images/icons/create_folder.gif"/>
- <h:graphicImage value="/images/icons/copy.gif"/>
- </tb:toolbarGroup>
- <tb:toolbarGroup itemSeparator="disc">
- <h:graphicImage value="/images/icons/save.gif"/>
- <h:graphicImage value="/images/icons/save_as.gif"/>
- <h:graphicImage value="/images/icons/save_all.gif"/>
- </tb:toolbarGroup>
- <tb:toolbarGroup location="right"
itemSeparator="square">
- <h:graphicImage value="/images/icons/find.gif"/>
- <h:graphicImage value="/images/icons/filter.gif"/>
- </tb:toolbarGroup>
- </tb:toolbar>
-
- <br/>
- <tb:toolbar height="26" itemSeparator="grid">
- <tb:toolbarGroup itemSeparator="line">
- <h:graphicImage value="/images/icons/create_doc.gif"/>
- <h:graphicImage value="/images/icons/create_folder.gif"/>
- <h:graphicImage value="/images/icons/copy.gif"/>
- </tb:toolbarGroup>
- <tb:toolbarGroup itemSeparator="disc">
- <h:graphicImage value="/images/icons/save.gif"/>
- <h:graphicImage value="/images/icons/save_as.gif"/>
- <h:graphicImage value="/images/icons/save_all.gif"/>
- </tb:toolbarGroup>
- <tb:toolbarGroup location="right"
itemSeparator="square">
- <h:graphicImage value="/images/icons/find.gif"/>
- <h:graphicImage value="/images/icons/filter.gif"/>
- </tb:toolbarGroup>
- </tb:toolbar>
- </h:body>
+ </f:facet>
+ <tb:toolbarGroup itemStyle="border: 1px solid green"
itemClass="custom-item-group" itemSeparator="line"
+ onitemclick="22">
+ <h:graphicImage value="/images/icons/create_doc.gif"/>
+ <a href="#">link 1</a> Text
+ <a href="#">link 2</a>
+ <h:graphicImage value="/images/icons/create_folder.gif"
onclick="q1"/>
+ <h:graphicImage value="/images/icons/copy.gif"/>
+ <a href="#">link 3</a> Text
+ <a href="#">link 4</a>
+ </tb:toolbarGroup>
+ <tb:toolbarGroup itemSeparator="none">
+ <h:graphicImage value="/images/icons/save.gif"
onclick="q2"/>
+ <h:graphicImage value="/images/icons/save.gif"
onclick="q2"/>
+ <h:graphicImage value="/images/icons/save.gif"
onclick="q2"/>
+ <h:graphicImage value="/images/icons/save.gif"
onclick="q2"/>
+ </tb:toolbarGroup>
+ <tb:toolbarGroup itemSeparator="line">
+ <h:graphicImage value="/images/icons/save.gif"
onclick="q2"/>
+ <h:graphicImage value="/images/icons/save.gif"
onclick="q2"/>
+ </tb:toolbarGroup>
+
+ <tb:toolbarGroup location="right"
itemSeparator="square">
+ <h:graphicImage value="/images/icons/find.gif"/>
+ <h:graphicImage value="/images/icons/filter.gif"/>
+ </tb:toolbarGroup>
+ </tb:toolbar>
+ <br/>
+ <tb:toolbar itemSeparator="grid" itemStyle="border: 1px solid
green" itemClass="custom-item">
+ <tb:toolbarGroup itemSeparator="line" itemStyle="border: 1px
solid green" itemClass="custom-item-group">
+ <h:graphicImage value="/images/icons/create_doc.gif"/>
+ <h:graphicImage value="/images/icons/create_folder.gif"/>
+ <h:graphicImage value="/images/icons/copy.gif"/>
+ </tb:toolbarGroup>
+ <tb:toolbarGroup itemSeparator="disc">
+ <h:graphicImage value="/images/icons/save.gif"/>
+ <h:graphicImage value="/images/icons/save_as.gif"/>
+ <h:graphicImage value="/images/icons/save_all.gif"/>
+ </tb:toolbarGroup>
+ <tb:toolbarGroup location="right"
itemSeparator="square">
+ <h:graphicImage value="/images/icons/find.gif"/>
+ <h:graphicImage value="/images/icons/filter.gif"/>
+ </tb:toolbarGroup>
+ </tb:toolbar>
+
+ <br/>
+ <tb:toolbar height="26" itemSeparator="grid">
+ <tb:toolbarGroup itemSeparator="line">
+ <h:graphicImage value="/images/icons/create_doc.gif"/>
+ <h:graphicImage value="/images/icons/create_folder.gif"/>
+ <h:graphicImage value="/images/icons/copy.gif"/>
+ </tb:toolbarGroup>
+ <tb:toolbarGroup itemSeparator="disc">
+ <h:graphicImage value="/images/icons/save.gif"/>
+ <h:graphicImage value="/images/icons/save_as.gif"/>
+ <h:graphicImage value="/images/icons/save_all.gif"/>
+ </tb:toolbarGroup>
+ <tb:toolbarGroup location="right"
itemSeparator="square">
+ <h:graphicImage value="/images/icons/find.gif"/>
+ <h:graphicImage value="/images/icons/filter.gif"/>
+ </tb:toolbarGroup>
+ </tb:toolbar>
+
+ <h:form>
+ <a4j:commandLink value="Ajax Rerender Toolbar" render="tb"
/>
+ <a4j:log />
+ </h:form>
+</h:body>
+</f:view>
</html>
\ No newline at end of file
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ToolbarRendererBase.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ToolbarRendererBase.java 2011-01-13
18:01:32 UTC (rev 21002)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ToolbarRendererBase.java 2011-01-13
19:31:58 UTC (rev 21003)
@@ -244,7 +244,7 @@
writer.startElement(HtmlConstants.TD_ELEM, component);
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE,
concatClasses("rf-tb-emp", itemClass), null);
- writer.write(" ");
+ writer.writeText("\u00a0", null);
writer.endElement(HtmlConstants.TD_ELEM);
for (Iterator<UIComponent> it = childrenToTheRight.iterator();
it.hasNext();) {
@@ -326,7 +326,7 @@
String itemSeparatorClass = "rf-tb-sep-" +
separator.toString().toLowerCase();
writer.startElement(HtmlConstants.DIV_ELEM, component);
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, itemSeparatorClass,
null);
- writer.write(" ");
+ writer.writeText("\u00a0", null);
writer.endElement(HtmlConstants.DIV_ELEM);
} else {