1 package org.starobjects.wicket.ui.components.empty;
2
3 import org.apache.wicket.markup.html.form.Button;
4 import org.apache.wicket.model.Model;
5 import org.starobjects.wicket.model.models.ActionModel;
6 import org.starobjects.wicket.ui.panels.PanelAbstract;
7
8 public class EmptyCollectionPanel extends PanelAbstract<ActionModel> {
9
10 private static final long serialVersionUID = 1L;
11
12 public EmptyCollectionPanel(String id, final ActionModel model) {
13 super(id, model);
14 buildGui(id);
15 }
16
17 private void buildGui(String id) {
18 final ActionModel model = getModel();
19 addOrReplace(new Button("ok", Model.of("OK")) {
20
21 private static final long serialVersionUID = 1L;
22
23 @Override
24 public void onSubmit() {
25 model.getNoResultsHandler().onNoResults(this);
26 }
27 });
28 }
29
30 }