Hi,

I have a ListView with a dynamic model. I am trying to update the view
using AjaxSelfUpdatingTimerBehavior. It doesn't seem to be working,
however (with snapshot version 20060227-0200). It seems that the
AjaxSelfUpdatingTimerBehavior.onTimer() methods gets called only once.

The following code (a much simplified version of the real code)
illustrates the problem.

-Ramnivas

public class AJAXListHome extends WebPage {
   public AJAXListHome() {
       ListView testListView = new TestListView("dates");
       add(testListView);
       testListView.add(new
AjaxSelfUpdatingTimerBehavior(Duration.seconds(5)));
   }
}

class TestListView extends ListView {
   public TestListView(String id) {
       super(id);
   }

   public IModel getModel() {
       List<String> list = new ArrayList<String>();
       list.add(new Date().toString());
       return new Model((Serializable)list);
   }

   @Override
   protected void populateItem(ListItem item) {
       String date = (String)item.getModelObject();
       item.add(new Label("date", date));
   }
}






-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to