我如何告诉 DefaultDataTable 自行刷新?
我是威克特的新手。我有一个搜索页面,其中包含两个字段:startDate
和 endDate
,位于面板内的表单内。该面板包含一个DefaultDataTable
。当用户提交表单时,我在 onSubmit()
中使用 startDate
和 endDate
来获取结果。然而,我的桌子仍然是空的。如何告诉 DefaultDataTable
刷新?
我已向此示例添加了一个表单和一个提交按钮。如果我想更改列表的内容,应该在哪里进行呢?
Button submitButton = new Button("submitButton"){
@Override
public void onSubmit(){
System.out.println("submit button was clicked");
}
};
Form myForm = new Form("myForm");
myForm.add(submitButton);
add(myForm);
I am new to Wicket. I have a search page with two fields, startDate
and endDate
, inside a form that is inside a panel. The panel contains a DefaultDataTable
. When the user submits the form, I use the startDate
and endDate
in the onSubmit()
to get the results. However, my table remains empty. How do I tell the DefaultDataTable
to refresh?
I have added a form and a submit button to this example. If I want to change the contents of the list, where do I do it?
Button submitButton = new Button("submitButton"){
@Override
public void onSubmit(){
System.out.println("submit button was clicked");
}
};
Form myForm = new Form("myForm");
myForm.add(submitButton);
add(myForm);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,这是我的评论作为正确的答案:使 DataProvider.iterator() 依赖于 2 个日期。
Ok, here is my comment as proper answer: make the DataProvider.iterator() dependend on the 2 Dates.