Hi list, sorry for this repost, but I'cant find an answer to the question
and I don't know if this behaviour is intentional or a bug

I'm new to wicket. I've some problem with a Formteser.submitLink that should
sumbit a form throught a link that stay outside the form. I've played with
the wicket provided test case org.apache.wicket.markup.html.
link.submitLink.FormPage and FormPageTest.
in the FormPage I've changed the definition of somevalue deleting the final

protected int somevalue = 1;

In the TestCase I changed the testFormAndLinkAreSubmitted as follows, simply
setting a value in the field before the submitLink and then verify in the
model the correctness of the value. but fails, as if the submitLink doesn't
post the data.

    public void testFormAndLinkAreSubmitted()
        WicketTester tester = new WicketTester();

        FormPage page = (FormPage)tester.getLastRenderedPage();


        FormTester formTester = tester.newFormTester("form");
        formTester.setValue("field", "2");
        formTester.submitLink("link", true);

        page = (FormPage)tester.getLastRenderedPage();

        tester.assertModelValue("form:field", 2);

It's a bug or a mine misunderstanding?Somebody could help me, please?
 Many thanks in advance
  Andrea Selva

Reply via email to