engine.getClassResolver();
enginec.setReturnValue(getClassResolver());
MockControl supportc = newControl(PageRenderSupport.class);
PageRenderSupport support = (PageRenderSupport) supportc.getMock();
trainGetPageRenderSupport(cyclec, cycle, support);
replayControls();
final FormSupport fs = new FormSupportImpl(writer, cycle, form);
verifyControls();
form.setBody(new IRender()
{
public void render(IMarkupWriter pwriter, IRequestCycle pcycle)
{
fs.addEventHandler(FormEventType.RESET, "myReset1");
fs.addEventHandler(FormEventType.RESET, "myReset2");
}
});
MockControl linkc = newControl(ILink.class);
ILink link = (ILink) linkc.getMock();
IRender render = (IRender) newMock(IRender.class);
trainRegister(support);
link.getParameterNames();
linkc.setReturnValue(new String[]
{ "service" });
link.getParameterValues("service");
linkc.setReturnValue(new String[]
{ "fred" });
writer.getNestedWriter();
writerc.setReturnValue(nested);
link.getURL(null, false);
linkc.setReturnValue("/app");
writer.begin("form");
writer.attribute("method", "post");
writer.attribute("action", "/app");
writer.attribute("name", "myform");
writer.attribute("id", "myform");
render.render(writer, cycle);
writer.println();
writer.begin("div");
trainHidden(writer, "formids", "");
trainHidden(writer, "service", "fred");
trainHidden(writer, "submitmode", "");
writer.end();
nested.close();
writer.end();
support
.addInitializationScript("Tapestry.onreset('myform', function (event)\n{\n myReset1();\n myReset2();\n});\n");
trainGetFocusField(delegatec, delegate, null);
replayControls();