public void test_Invoke_Form_Listener_Enabled_Focus()
{
IRequestCycle cycle = newCycle();
IForm form = newForm();
checkOrder(form, false);
FormSupport formSupport = newMock(FormSupport.class);
IComponentSpecification spec = new ComponentSpecification();
IValidationDelegate delegate = newMock(IValidationDelegate.class);
ListenerInvoker listenerInvoker = newMock(ListenerInvoker.class);
ListenerMap listenerMap = newMock(ListenerMap.class);
IActionListener listener = newMock(IActionListener.class);
IPage page = newMock(IPage.class);
checkOrder(page, false);
Map comps = new HashMap();
comps.put("form1", form);
Map tprops = new HashMap();
tprops.put("id", "form1");
BrowserEvent event = new BrowserEvent("onSelect", "form1", "form1", new EventTarget(tprops));
ComponentEventInvoker invoker = new ComponentEventInvoker();
invoker.setInvoker(listenerInvoker);
spec.addEventListener("form1", new String[] { "onSelect" }, "fooListener",
"form1", false, false, true, false);
invoker.addFormEventListener("form1", spec);
expect(formSupport.getForm()).andReturn(form);
expect(form.getExtendedId()).andReturn("form1").anyTimes();
expect(form.getPage()).andReturn(page);
expect(page.getNestedComponent(null)).andReturn(form);