various updates, opensocial support
[ical-aggregator.git] / src / main / java / net / bzzt / ical / aggregator / web / EventVerificationPage.java
blobeb658bdc977bf3fe3c77de22a5e001a82eef41c3
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
14 @SpringBean
15 private FeedService feedService;
17 public EventVerificationPage()
19 add(new PropertyListView<Event>("event", feedService.getEventsToVerify())
22 /**
25 private static final long serialVersionUID = 1L;
27 @Override
28 protected void populateItem(final ListItem<Event> item)
30 item.add(new Label("summary"));
31 item.add(new Link<Void>("deny")
34 /**
37 private static final long serialVersionUID = 1L;
39 @Override
40 public void onClick()
42 feedService.delete(item.getModelObject());
43 setResponsePage(EventVerificationPage.class);
46 });
47 item.add(new Link<Void>("confirm")
50 /**
53 private static final long serialVersionUID = 1L;
55 @Override
56 public void onClick()
58 Event event = item.getModelObject();
59 event.setHidden(false);
60 feedService.saveOrUpdateEvent(event);
61 setResponsePage(EventVerificationPage.class);
64 });
67 });