Author: Alex.Kolonitsky
Date: 2009-07-14 05:32:48 -0400 (Tue, 14 Jul 2009)
New Revision: 14916
Modified:
branches/community/3.3.X/ui/spacer/src/main/templates/spacer.jspx
branches/community/3.3.X/ui/spacer/src/test/java/org/richfaces/component/SpacerComponentTest.java
Log:
spacer: "title" attribute doesn't work
https://jira.jboss.org/jira/browse/RF-7503
Modified: branches/community/3.3.X/ui/spacer/src/main/templates/spacer.jspx
===================================================================
--- branches/community/3.3.X/ui/spacer/src/main/templates/spacer.jspx 2009-07-14 09:21:44
UTC (rev 14915)
+++ branches/community/3.3.X/ui/spacer/src/main/templates/spacer.jspx 2009-07-14 09:32:48
UTC (rev 14916)
@@ -15,7 +15,8 @@
<img id="#{clientId}"
width="#{component.attributes['width']}"
height="#{component.attributes['height']}"
- alt="#{component.attributes['title']}"
+ alt=""
+ title="#{component.attributes['title']}"
src="#{spacer}"
class="rich-spacer #{component.attributes['styleClass']}"
x:passThruWithExclusions="id,width,height,title,styleClass,class,alt,src"
Modified:
branches/community/3.3.X/ui/spacer/src/test/java/org/richfaces/component/SpacerComponentTest.java
===================================================================
---
branches/community/3.3.X/ui/spacer/src/test/java/org/richfaces/component/SpacerComponentTest.java 2009-07-14
09:21:44 UTC (rev 14915)
+++
branches/community/3.3.X/ui/spacer/src/test/java/org/richfaces/component/SpacerComponentTest.java 2009-07-14
09:32:48 UTC (rev 14916)
@@ -69,7 +69,7 @@
spacer.setId("spacer");
spacer.getAttributes().put("width", "30");
spacer.getAttributes().put("height", "10");
- spacer.getAttributes().put("title", "10");
+ spacer.getAttributes().put("title", "title");
spacer.getAttributes().put("style", "background-color: lime");
// spacer.getAttributes().put("height", new Integer(10));
@@ -102,20 +102,14 @@
.getHtmlElementById(spacer.getClientId(facesContext));
assertNotNull(htmlSpacer);
- String str = htmlSpacer.getAttributeValue("width");
- assertEquals("30", str);
- str = htmlSpacer.getAttributeValue("height");
- assertEquals("10", str);
- str = htmlSpacer.getAttributeValue("style");
- assertEquals("background-color: lime", str);
+ assertEquals("30", htmlSpacer.getAttributeValue("width"));
+ assertEquals("10", htmlSpacer.getAttributeValue("height"));
+ assertEquals("title", htmlSpacer.getAttributeValue("title"));
+ assertEquals("", htmlSpacer.getAttributeValue("alt"));
+ assertEquals("background-color: lime",
htmlSpacer.getAttributeValue("style"));
+ assertTrue(htmlSpacer.getAttributeValue("class").contains("rich-spacer"));
+ assertTrue(htmlSpacer.getSrcAttribute().contains("images/spacer.gif"));
- str = htmlSpacer.getClassAttribute();
- str = htmlSpacer.getAttributeValue("class");
- assertTrue(str.contains("rich-spacer"));
-
- str = htmlSpacer.getSrcAttribute();
- assertTrue(str.contains("images/spacer.gif"));
-
//System.out.println(renderedView.getWebResponse().getContentAsString());
/*