Author: abelevich
Date: 2008-04-14 10:56:06 -0400 (Mon, 14 Apr 2008)
New Revision: 7806
Modified:
branches/3.2.x/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
branches/3.2.x/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
Log:
http://jira.jboss.com/jira/browse/RF-3058,
http://jira.jboss.com/jira/browse/RF-3059,
Modified:
branches/3.2.x/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
===================================================================
---
branches/3.2.x/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-04-14
14:46:43 UTC (rev 7805)
+++
branches/3.2.x/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-04-14
14:56:06 UTC (rev 7806)
@@ -189,7 +189,7 @@
applyTmpValue : function() {
if (this.comboList.activeItem) {
- var userLabel = this.comboList.activeItem.innerHTML;
+ var userLabel = this.comboList.activeItem.innerHTML.unescapeHTML();
this.currentItemValue = this.comboList.activeItem.value;
this.tempValueKeeper.value = userLabel;
this.comboList.selectedItem = this.comboList.activeItem;
@@ -223,7 +223,7 @@
if (item) {
this.comboList.doSelectItem(item);
- $super(e, item.innerHTML);
+ $super(e, item.innerHTML.unescapeHTML());
} else {
$super(e, "");
}
Modified: branches/3.2.x/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
===================================================================
--- branches/3.2.x/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-04-14
14:46:43 UTC (rev 7805)
+++ branches/3.2.x/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-04-14
14:56:06 UTC (rev 7806)
@@ -36,13 +36,18 @@
}
String fieldLabel = getSelectedItemLabel(context, component);
value = getConvertedStringValue(context, component,value);
- Object fieldValue = value;
+ String fieldValue = (String)value;
if (value == null || value.equals("")) {
fieldValue = "";
}
+
+
+ String encodedFieldValue = encodeValue(fieldValue);
+
variables.setVariable("fieldLabel", fieldLabel);
variables.setVariable("fieldValue", fieldValue);
+ variables.setVariable("encodedFieldValue", encodedFieldValue);
/*String saveIcon =
(String)component.getAttributes().get("saveControlIcon");
if (saveIcon != null && saveIcon.length() != 0 ) {
@@ -183,7 +188,7 @@
new Richfaces.InplaceSelect(new
Richfaces.InplaceSelectList('list#{clientId}', 'listParent#{clientId}',
true,
Richfaces.InplaceSelect.CLASSES.COMBO_LIST,
'#{component.attributes["listWidth"]}',
'#{component.attributes["listHeight"]}',
#{this:getItemsTextAsJSArray(context, component,items)}, null,
- '#{clientId}inplaceTmpValue',
'shadow#{clientId}', 0, 0, '#{fieldValue}'),
+ '#{clientId}inplaceTmpValue',
'shadow#{clientId}', 0, 0, #{encodedFieldValue}),
'#{clientId}', '#{clientId}inplaceTmpValue',
'#{clientId}inplaceValue', '#{clientId}tabber',
{defaultLabel :
'#{component.attributes["defaultLabel"]}',