JSONObject spec = new JSONObject("element", clientId);
addFunction(spec, "show", showFunctionName);
addFunction(spec, "update", updateFunctionName);
FormSupport formSupport = environment.peek(FormSupport.class);
if (formSupport != null)
{
JSONObject parameters = new JSONObject(RequestConstants.FORM_CLIENTID_PARAMETER, formSupport.getClientId(),
RequestConstants.FORM_COMPONENTID_PARAMETER, formSupport.getFormComponentId());
spec.put("parameters", parameters);
}
javascriptSupport.addInitializerCall("zone", spec);
}