beginning to implement new panel, starting with service
This commit is contained in:
parent
92f638839e
commit
8654731f43
src
main/java/se/su/dsv/scipro/admin/panels
test/java/se/su/dsv/scipro/springdata/repos/services
@ -3,6 +3,12 @@
|
||||
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
||||
<body>
|
||||
<wicket:panel>
|
||||
|
||||
|
||||
<div wicket:id="listview">
|
||||
<div><span wicket:id="statusNameLabel"></span> </div>
|
||||
</div>
|
||||
|
||||
<!--<div wicket:id="container">-->
|
||||
<!--<table class="rounded-corner">-->
|
||||
<!--<thead>-->
|
||||
|
@ -1,6 +1,15 @@
|
||||
package se.su.dsv.scipro.admin.panels;
|
||||
|
||||
import org.apache.wicket.markup.html.basic.Label;
|
||||
import org.apache.wicket.markup.html.list.ListItem;
|
||||
import org.apache.wicket.markup.html.list.ListView;
|
||||
import org.apache.wicket.markup.html.panel.Panel;
|
||||
import org.apache.wicket.spring.injection.annot.SpringBean;
|
||||
import se.su.dsv.scipro.springdata.repos.ProjectIdeaRepo;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import static se.su.dsv.scipro.match.dataobject.Match.Status;
|
||||
|
||||
/**
|
||||
* @author: fred-fri
|
||||
@ -10,8 +19,28 @@ public class ProjectIdeaStatisticsPanel extends Panel {
|
||||
|
||||
private static final long serialVersionUID = -8964934681195275340L;
|
||||
|
||||
@SpringBean
|
||||
ProjectIdeaRepo projectIdeaRepo;
|
||||
|
||||
public ProjectIdeaStatisticsPanel(String id) {
|
||||
super(id);
|
||||
|
||||
ArrayList<Status> valueArray = new ArrayList<Status>();
|
||||
|
||||
for (Status s : Status.values()) {
|
||||
valueArray.add(s);
|
||||
}
|
||||
|
||||
ListView listview = new ListView("listview", valueArray) {
|
||||
protected void populateItem(ListItem item) {
|
||||
Status s = (Status) item.getModelObject();
|
||||
item.add(new Label("statusNameLabel", s.name()));
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
add(listview);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,11 @@
|
||||
package se.su.dsv.scipro.springdata.repos.services;
|
||||
|
||||
/**
|
||||
* @author: fred-fri
|
||||
* date: 2012 03 26
|
||||
*/
|
||||
public class ProjectIdeaService {
|
||||
|
||||
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user