[ https://issues.apache.org/jira/browse/TAP5-10?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship closed TAP5-10. ------------------------------------ Resolution: Fixed Fix Version/s: 5.0.16 > An onActivate() event handler on a page can cause PageTester to fail with a > NullPointerException > ------------------------------------------------------------------------------------------------ > > Key: TAP5-10 > URL: https://issues.apache.org/jira/browse/TAP5-10 > Project: Tapestry 5 > Issue Type: Bug > Affects Versions: 5.0.15 > Environment: Java 1.5.0_13, Eclipse 3.3.1.1, Windows 2000 > Reporter: Franz Amador > Assignee: Howard M. Lewis Ship > Fix For: 5.0.16 > > Attachments: PageTester-test.zip > > > PageTester.submitForm throws a NullPointerException if the form returns a > page that itself forwards to another page via onActivate. For example: > @Test > public void testSubmit() { > Document dom = tester.renderPage("Page1"); > tester.submitForm(dom.getElementById("form"), new HashMap<String, > String>()); > } > public class Page1 { > Object onSuccess() { > return Page2.class; > } > public class Page2 { > Object onActivate() { > return Page3.class; > } > FAILED: testSubmit > java.lang.NullPointerException > at > org.apache.tapestry.internal.test.PageLinkInvoker.invoke(PageLinkInvoker.java:61) > at org.apache.tapestry.test.PageTester.invoke(PageTester.java:167) > at > org.apache.tapestry.internal.test.ActionLinkInvoker.invoke(ActionLinkInvoker.java:78) > at org.apache.tapestry.test.PageTester.invoke(PageTester.java:167) > at org.apache.tapestry.test.PageTester.submitForm(PageTester.java:195) > at com.acme.app.pages.Page1Test.testSubmit(Page1Test.java:30) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]