what happens if you set: lv.setReuseItems(true); to false?
and what do you mean with "go back and edit" ? browser back? johan On Tue, Mar 25, 2008 at 3:02 PM, taygolf <[EMAIL PROTECTED]> wrote: > > ok here is what I have. i have a listview that I want to update on the > fly. > The user clicks a link and that link opens a popup. in that popup the user > will put in the information required and hit submit. once the information > is > submitted I am saving it in a session list of models. So the model that > was > created on the popup page is added to the list. > > THe listview is created using the session list as a > loadabledetachablemodel. > Everytime a new entry is entered everything works fine but if I want to go > back and edit a previous entry then the listview never shows that update. > > So how can I get the listview to see the update. I am thinking that the > loadabledetachable model is not getting the latest and greatest session > list. I think it may only be looking for additions and not getting all of > them. HOw do I fix that. > > Here is my code > > IModel kmList = new LoadableDetachableModel() > { > protected Object load() { > return MySession.get().getKeymemberList(); > } > }; > > ListView lv = new ListView("rows", kmList) > { > public void populateItem(final ListItem item) > { > KeyMemberData kmd = > (KeyMemberData)item.getModelObject(); > item.add(new Label("kmname", kmd.getName())); > item.add(new Label("kmsec", kmd.getSecurity())); > item.add(new Label("kmroles", kmd.getRoles())); > } > }; > lv.setReuseItems(true); > lv.setOutputMarkupId(true); > WebMarkupContainer listContainer = new > WebMarkupContainer("theContainer"); > listContainer.setOutputMarkupId(true); > listContainer.add(new > AjaxSelfUpdatingTimerBehavior(Duration.seconds(5))); > > listContainer.add(lv); > add(listContainer); > -- > View this message in context: > http://www.nabble.com/ListView-not-updating-when-changed-tp16274984p16274984.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >