Hi,

I have the following MarkupContainer:

       final MarkupContainer panel = new WebMarkupContainer("panel");
       panel.setOutputMarkupId(true);

        form.add(panel);

        ArrayList<Contact> rows = new ArrayList<Contact>(1);
        rows.add(new Contact());

        final ListView<Contact> lv = new ListView<Contact>("rows", rows) {

            private static final long serialVersionUID = 1L;

            @Override
            protected void populateItem(ListItem<Contact> item) {
                 Contact c = new Contact();

                 TextField<Contact> text = new TextField<Contact>("field",
new PropertyModel<Contact>(c, "id"));

                 item.add(text);
            }
        };
        lv.setReuseItems(true);
        panel.add(lv);

There is also an ADD MORE button, that adds more of those on the page.


                    <div wicket:id="panel">
                       <span wicket:id="rows">
                          <input wicket:id="field" name="large" type="text"
/>
                       </span>
                    </div>

I using FormTester to test the page:
FormTester formTester = getWicketTester().newFormTester("myForm");

formTester.setValue("field", "BLAH");

But that does not work.

Thanks,
Anna

Reply via email to