Hi,
Hacking away at some tests, I figured the proper way to test an
AjaxSubmitLink would have been as follows:

        Panel p = tester.startPanel(EventPanel.class);
        FormTester ft = tester.newFormTester(p.getId() + ":eventForm");
        ft.setValue("messageField", ALARM_MESSAGE);
        tester.clickLink(p.getId() + ":eventFormSubmitLink", true);

However, the values set in the FormTester don't get submitted for some
reason. It works if I change it to:

        Panel p = tester.startPanel(EventPanel.class);
        tester.setParameterForNextRequest(p.getId() +
":eventForm:messageField", ALARM_MESSAGE);
        tester.clickLink(p.getId() + ":eventFormSubmitLink", true);

which while 1 line briefer, didn't seem intuitive (to me at least). Is
it possible to make it work like the former, or is it better left as
it is?

best,
jim

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to