internal override string GetClientConstructor(bool instanceOnly, string body)
{
if (this.Target.IsEmpty())
{
throw new ArgumentNullException("Target", "The Target must defined for KeyMap control");
}
if (this.Keys.Count == 0)
{
return "";
}
string template = (instanceOnly) ? "new {1}(Ext.net.getEl({2}),{3}{4})" : "this.{0}=new {1}(Ext.net.getEl({2}),{3}{4});";
return string.Format(template, this.ClientID,
"Ext.KeyMap",
this.TargetProxy,
this.KeysProxy,
this.EventName.IsEmpty() ? "" : "," + this.EventName);
}