Closed
@lbispham

Description

Description

I am generating a RadioBox from a TitleMap. The form JSON is invalid.

Steps to Reproduce

public class UserValues implements ValuesContainer {

@Override
public Map<String, String> getValues() {
    ImmutableMap.Builder<String, String> builder = ImmutableMap.builder();
    builder.put("Custom", "Custom");
    builder.put("Standard", "Standard");
    return builder.build();
}

}

@Radiobox(title = "Choose a setting", titleMap = UserValues .class)
private String choose;

Expected behavior: [What you expect to happen]

I expect my JSON for the form to look like this:

{ "key": "choose", "readOnly": false, "type": "radios", "titleMap": [ { "name": "Custom", "value": "Custom" }, { "name": "Standard", "value": "Standard" } ] }

Actual behavior: [What actually happens]

Instead the JSON is invalid and looks like this (no quotation marks around the values in the titleMap):

{ "key": "choose", "readOnly": false, "type": "radios", "titleMap": [ { "name": "Custom", "value": Custom }, { "name": "Standard", "value": Standard } ] }

Versions

1.0.0

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.