I want to change the data of a listview on a Button Click.

This is what I do currently:

/
final PageableListView<Users> listview = new PageableListView<Users>("rows",
displayList, 10) {
    //.... 
    protected void populateItem(final ListItem<Users> item) {
        item.add(new Label("username").setOutputMarkupId(true));
        // .. other fields
    }
}/
/
final IndicatingAjaxFallbackLink<MyPanel> sublist = new
IndicatingAjaxFallbackLink<MyPanel>("sublist") {
        public void onClick(AjaxRequestTarget target) {
                displayList = // get new list
                listview.setList(displayList);
                target.addChildren(listview, Label.class);
        }
};
add(sublist);/


This works if the new list is exactly the same size ad the old list. In any
other case I get an


/Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1/

How can I fix this problem?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Replacing-items-in-a-ListView-tp4666326.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