@RequestMapping("/json/app/(*:appId)/(~:appVersion)/form/options")
  public void formAjaxOptions(
      Writer writer,
      @RequestParam("appId") String appId,
      @RequestParam(value = "appVersion", required = false) String appVersion,
      @RequestParam("_dv") String dependencyValue,
      @RequestParam("_n") String nonce,
      @RequestParam("_bd") String binderData)
      throws JSONException {
    AppDefinition appDef = appService.getAppDefinition(appId, appVersion);
    FormRowSet rowSet =
        FormUtil.getAjaxOptionsBinderData(dependencyValue, appDef, nonce, binderData);

    JSONArray jsonArray = new JSONArray();
    if (rowSet != null) {
      for (Map row : rowSet) {
        Map<String, String> data = new HashMap<String, String>();
        data.put(FormUtil.PROPERTY_LABEL, (String) row.get(FormUtil.PROPERTY_LABEL));
        data.put(FormUtil.PROPERTY_VALUE, (String) row.get(FormUtil.PROPERTY_VALUE));
        jsonArray.put(data);
      }
    }

    jsonArray.write(writer);
  }