检票:自动重新加载AjaxLazyLoadPanel [英] Wicket: reload AjaxLazyLoadPanel automatically
问题描述
我有一个表单的页面。从表单中使用的数据,我从一个BBDD获取信息,我使用Ajax显示在面板上。
I have a page with a form. Using the data from the form I get information from a BBDD and I displayed in a panel using Ajax.
现在我试图用一个AjaxLazyLoadPanel,因为有些在BBDD查询的是沉重的。我的问题是AjaxLazyLoadPanel的第一次加载后,我不知道如何与新的内容(新搜索)重新加载它。
Now I was trying to use a AjaxLazyLoadPanel, because some of the query in the BBDD are heavy. The problem i have is after the first load of AjaxLazyLoadPanel, i dont know how to reload it with the new content (a new search).
任何意见?
谢谢!
推荐答案
我还没有与AjaxLazyLoadPanel,但通用的方法,定期更新组件安装的<一个href="http://wicket.apache.org/apidocs/1.4/org/apache/wicket/ajax/AjaxSelfUpdatingTimerBehavior.html">AjaxSelfUpdatingTimerBehavior:
I have not worked with AjaxLazyLoadPanel, but the generic approach to periodically updating a component is attaching an AjaxSelfUpdatingTimerBehavior:
add(new AjaxLazyLoadPanel("myPanel"){
// implementation here
}
.setOutputMarkupId()
.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(2))));
或者,如果还是不行,在行为不同的组件,让AjaxRequestTarget <一href="http://wicket.apache.org/apidocs/1.4/org/apache/wicket/ajax/AjaxRequestTarget.html#addComponent%28org.apache.wicket.Component%29">add在AjaxLazyLoadPanel (您可能需要先装上AjaxLazyLoadPanel)。
Or, if that does not work, at the behavior to a different component and let the AjaxRequestTarget add the AjaxLazyLoadPanel (you might have to attach the AjaxLazyLoadPanel first).
下面是关于检票口和AJAX一些相关链接:
Here are a few relevant links about wicket and AJAX:
- How to do things in Wicket - AJAX
- How Wicket does AJAX
- WicketByExample.com / AJAX
- How to use AjaxLazyLoadPanel in Wicket
这篇关于检票:自动重新加载AjaxLazyLoadPanel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!