I tried to create Sortable list using Wicket Stuff, but the
SortableListView give me an error. What do I do wrong here, below is the
code:

import wicket.contrib.scriptaculous.*;


add(new SortableListView("item", items)
            {
                protected void populateItem(ListItem item)
                {
                    // add an AJAX checkbox to the item
                    item.add(new AjaxCheckBox("check",
                            new PropertyModel(item.getModel(), "checked"))

                    {

                        protected void onUpdate(AjaxRequestTarget target)
                        {
                            // no need to do anything, the model is updated
by
                            // itself, and we don't have to re-render a
                            // component (the client already has the correct
                            // state).

                        }
                    });
                    // display the text of the milestone item

                    item.add(new Label("text", new PropertyModel(
item.getModel(), "text")));
 }
            });
        }
    }

Reply via email to