Author: abelevich
Date: 2009-07-06 13:47:27 -0400 (Mon, 06 Jul 2009)
New Revision: 14798
Modified:
branches/community/3.3.X/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java
branches/community/3.3.X/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
Log:
fix RF-6057
Modified:
branches/community/3.3.X/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java
===================================================================
---
branches/community/3.3.X/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java 2009-07-06
15:37:57 UTC (rev 14797)
+++
branches/community/3.3.X/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java 2009-07-06
17:47:27 UTC (rev 14798)
@@ -130,7 +130,11 @@
if(writer != null) {
writer.startElement(HTML.SPAN_ELEM, component);
writer.writeAttribute(HTML.class_ATTRIBUTE, classes, null);
- writer.writeText(value, null);
+ if(value != null && value.trim().length() > 0) {
+ writer.writeText(value, null);
+ } else {
+ writer.write("\u00a0");
+ }
writer.endElement(HTML.SPAN_ELEM);
}
}
Modified:
branches/community/3.3.X/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
===================================================================
---
branches/community/3.3.X/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2009-07-06
15:37:57 UTC (rev 14797)
+++
branches/community/3.3.X/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2009-07-06
17:47:27 UTC (rev 14798)
@@ -226,7 +226,11 @@
if (!item.itemValue || item.itemValue.blank()) {
item.itemValue = "";
}
-
+
+ if(item.itemLabel) {
+ item.itemLabel = item.itemLabel.replace(/\xA0/g, " ");
+ }
+
if (!item.itemLabel || item.itemLabel.blank()) {
item.itemLabel = this.attributes.defaultLabel;
}
@@ -255,7 +259,8 @@
applyTmpValue : function() {
if (this.comboList.activeItem) {
- var userLabel = this.comboList.activeItem.innerHTML.unescapeHTML();
+ var userLabel = jQuery(this.comboList.activeItem).text();
+ //var userLabel = this.comboList.activeItem.innerHTML.unescapeHTML();
this.currentItemValue = this.comboList.activeItem.value;
if(this.showValueInView) {
userLabel = this.currentItemValue;
Show replies by date