ListView lv = new PropertyListView("rows", kmList)
         {
               public void populateItem(final ListItem item)
               {
                       item.add(new Label("kmname"));
                       item.add(new Label("kmsec"));
                       item.add(new Label("kmroles"));
               }
         };

because you called setreuseitems(true) and hardcoded the values of
labels the updates will not show up because the component hierarchy is
not recreated due to setreuseitems(true). two options like others
said, turn off setreuseitems, or make your label display models
instead of hardcoded values, above is the easiest example...


-igor


On Tue, Mar 25, 2008 at 7:02 AM, 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]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to