Thanks, Igor. It works now.
Would it be possible to throw an exception when someone tries to add an
unacceptable Behavior such as AjaxSelfUpdatingTimerBehavior to a
listview (or any other class doesn't produce any markup itself).
-Ramnivas
Igor Vaynberg wrote:
you cannot update a listview itself directly because it
does not produce any markup itself. you need to put it into a
webmarkupcontainer and attach the update behavior to that.
WebMarkupContainer wmc=new WebMarkupContainer("wmc");
wmcv
add(wmc);
wmc.add(new ListView(........
wmc.add(new AjaxSelfUpdatingBehavio.....
and in markup <span wicket:id="wmc">...listview</span>
-Igor
On 3/2/06, Ramnivas
Laddad <[EMAIL PROTECTED]>
wrote:
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
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
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
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
|
- Re: [Wicket-user] ListView not working with AJAX Ramnivas Laddad
-