String elemScript = "/org/apache/tapestry/html/ElementEvent.script";
String compScript = "/org/apache/tapestry/ComponentEvent.script";
String widScript = "/org/apache/tapestry/dojo/html/WidgetEvent.script";
Resource compScriptResource = new ClasspathResource(resolver, compScript);
Resource widScriptResource = new ClasspathResource(resolver, widScript);
Resource elemScriptResource = new ClasspathResource(resolver, elemScript);
ComponentEventConnectionWorker worker = new ComponentEventConnectionWorker();
worker.setClassResolver(resolver);
worker.setEventInvoker(invoker);
worker.setComponentScript(compScript);