Hi all,
I found bug in version SNAPSHOT_v8.3d_2012-10-02/LGPL Deployment. Here is example:
And I found where the problem is.
FormItem.js contains this method:
In last condition you are testing if isc.isA.String(value), but probably you should test if isc.isA.String(displayValue) is true.
Best regards,
Jirka
I found bug in version SNAPSHOT_v8.3d_2012-10-02/LGPL Deployment. Here is example:
Code:
isc.DynamicForm.create({ width: 500, values : {shipTo : ["MX","IT","bug"]}, fields: [{ name: "shipTo", title: "Ship to", type: "select",multiple:"true", escapeHTML:"true", hint: "<nobr>Overnight shipping available for countries in bold</nobr>", valueMap: { "US" : "<b>United States</b>", "CH" : "China", "JA" : "<b>Japan</b>", "IN" : "India", "GM" : "Germany", "FR" : "France", "IT" : "Italy", "RS" : "Russia", "BR" : "<b>Brazil</b>", "CA" : "Canada", "MX" : "Mexico", "SP" : "Spain", "bug":"<iframe xxx" }, imageURLPrefix:"flags/16/", imageURLSuffix:".png", valueIcons: { "US" : "US", "CH" : "CH", "JA" : "JA", "IN" : "IN", "GM" : "GM", "FR" : "FR", "IT" : "IT", "RS" : "RS", "BR" : "BR", "CA" : "CA", "MX" : "MX", "SP" : "SP" } }] });
FormItem.js contains this method:
Code:
mapValueToDisplay : function (value) { // escapeHTML is not doc'd at the formItem level. It doesn't make sense for // all form item types, such as those with a native HTML input element, so will // be enabled via a flag where we need it. var asHTML = this.canEscapeHTML && // outputAsHTML / asHTML are old and deprecated (this.escapeHTML || this.outputAsHTML || this.asHTML); var displayValue = this._mapKey(value, true); if (displayValue != null) { displayValue = this._formatDataType(displayValue); } else { displayValue = this._formatDataType(value); } // Don't escape unless that's actually the data value! if (asHTML && (value == null || value == isc.emptyString) && displayValue == this._$nbsp) { asHTML = false; } if (asHTML && isc.isA.String(value)) { displayValue = displayValue.asHTML(); } return displayValue; }
Best regards,
Jirka
Comment