U4-3880 - Custom parameter editor with JSON valueType

Created by Joachim Andersen 16 Dec 2013, 10:12:14 Updated by Shannon Deminick 09 Jan 2014, 01:50:13

I have created a custom property editor that I also want to use as a parameter editor (for macros). The valueType is set to JSON which in my case is an object with various properties. When I use the parameter editor in a macro in the richtext editor the following is saved on the macro: [object Object], I have tracked it down to line 53 in macro.resource.js where the macro parameters is looped and added to the url as a string, that means that a toString is called on my javascript object.

As I read the documentation the only difference between property editors and parameter editors is the prevalues which are only supported by the property editors, but is it not supposed to be able to use JSON as valueType for parameter editors?

Cheers Joachim


Shannon Deminick 07 Jan 2014, 01:28:23

Instead of toString() we could use angular.toJson and then ensure it's encoded properly for storage inside of an html attribute - since that will be how the macro parameter data is persisted.

Shannon Deminick 09 Jan 2014, 01:50:13

fixed in rev 49cfeee5b0ad59bd36790fdcd9f5dbc5fe6ca41a

Priority: Major

Type: Bug

State: Fixed

Assignee: Shannon Deminick

Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions: 7.0.1

Due in version: 7.0.2


Story Points: