class JsUtil {

    public static String getJsObjectForFieldsValue(
            final Map<String, Object> jsKeyAndElementId) {

        final StringBuilder builder = new StringBuilder(38);

        builder.append('{');

        for (final Entry<String, Object> entry : jsKeyAndElementId.entrySet()) {

            builder.append(entry.getKey()).append(":document.getElementById('")
                    .append(entry.getValue().toString()).append("').value,");

        }

        builder.replace(builder.length() - 1, builder.length(), "}");

        return builder.toString();
    }

    private  JsUtil();

}