1 package net
.bzzt
.ical
.aggregator
.web
;
3 import net
.bzzt
.ical
.aggregator
.model
.Event
;
4 import net
.bzzt
.ical
.aggregator
.service
.FeedService
;
6 import org
.apache
.wicket
.markup
.html
.basic
.Label
;
7 import org
.apache
.wicket
.markup
.html
.link
.Link
;
8 import org
.apache
.wicket
.markup
.html
.list
.ListItem
;
9 import org
.apache
.wicket
.markup
.html
.list
.PropertyListView
;
10 import org
.apache
.wicket
.spring
.injection
.annot
.SpringBean
;
12 public class EventVerificationPage
extends AggregatorLayoutPage
15 private FeedService feedService
;
17 public EventVerificationPage()
19 add(new PropertyListView
<Event
>("event", feedService
.getEventsToVerify())
25 private static final long serialVersionUID
= 1L;
28 protected void populateItem(final ListItem
<Event
> item
)
30 item
.add(new Label("summary"));
31 item
.add(new Link
<Void
>("deny")
37 private static final long serialVersionUID
= 1L;
42 feedService
.delete(item
.getModelObject());
43 setResponsePage(EventVerificationPage
.class);
47 item
.add(new Link
<Void
>("confirm")
53 private static final long serialVersionUID
= 1L;
58 Event event
= item
.getModelObject();
59 event
.setHidden(false);
60 feedService
.saveOrUpdateEvent(event
);
61 setResponsePage(EventVerificationPage
.class);