Wicket doesn't allow me to update a ListView object directly through ajax, it
suggests putting it in in a container. So I made a WebMarkupContainer to
wrap the ListView. I have now:


public void onClick(AjaxRequestTarget target)
        {
                List list = new ArrayList(bean.getIncList());
                Incident inc = new Incident();
                inc.setAction("action");
                inc.setDescription("whatever description");
                list.add(inc);
                bean.setIncList(list);
                listView.modelChanged();
                container.modelChanged();
                container.setOutputMarkupId(true);
                listView.setOutputMarkupId(true);
                container.add(listView);
                target.addComponent(container);
        }


I've confirmed that the model is being updated. The component is still not
being redrawn.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/adding-items-dynamically-to-ListView-tp3580840p3580990.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to