Overwrite macro parameters dynamically


I tried to overwrite an enum parameter (select box) on the left side of the macro ui. I used setMacroJsOverride function but no value was changed.

The code in the macro.xml is following:

<xhtml-macro name="helloworld" class="com.atlassian.tutorial.macro.helloworld" key='helloworld-macro'>
		<description key="helloworld.macro.desc"/>
		<category name="formatting"/>
			<parameter name="Kaktus" type="string"/>
			<parameter name="Color" type="enum">
				<value name="red"/>
				<value name="test"/>
				<value name="blue"/>

The code in the macro.js file is following:

var jsOverrides = {
		"fields" : {
			"string" : {
				"Kaktus" : function(params,options){
					var field = AJS.MacroBrowser.ParameterFields["string"](params, options);
					console.log("HELLOOOO: ", field);
					return field;
	AJS.MacroBrowser.setMacroJsOverride("helloworld", jsOverrides);

I hope someone can help.

Thanks and kind regards.