Commit 0dff7937 by Tuomas Riihimäki

Pollwrapperia ja viewiä

1 parent deffb46b
package fi.insomnia.bortal.view; package fi.insomnia.bortal.view;
import java.util.List;
import javax.ejb.EJB; import javax.ejb.EJB;
import javax.faces.bean.ManagedBean; import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped; import javax.faces.bean.SessionScoped;
......
...@@ -58,19 +58,21 @@ public class PollWrapper { ...@@ -58,19 +58,21 @@ public class PollWrapper {
} }
public List<PollAnswer> getAnswers() { public List<PollAnswer> getAnswers() {
// TODO Auto-generated method stub ArrayList<PollAnswer> ret = new ArrayList<PollAnswer>();
return null; for (List<QuestionWrapper> qw : pages.values()) {
for (QuestionWrapper wrapper : qw) {
ret.add(wrapper.getAnswer());
}
}
return ret;
} }
public boolean validate(PollView pollView) { public boolean validate(PollView pollView) {
boolean ret = true; boolean ret = true;
// STuff
return ret; return ret;
} }
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!