String js = "tapestry.form." + type + "('" + form.getClientId() + "', '" + getName() + "'";
if (isAsync)
{
JSONObject json = new JSONObject();
json.put(new JSONLiteral("async"), Boolean.TRUE);
json.put(new JSONLiteral("json"), isJson());
DirectServiceParameter dsp = new DirectServiceParameter(form, null, this);
json.put(new JSONLiteral("url"), new JSONLiteral("this.href"));
writer.attribute("href", getDirectService().getLink(true, dsp).getURL());
writer.attribute("onClick", js + "," + json.toString() + "); return false;");
} else {