19 package org.turro.polls;
21 import java.util.Collection;
22 import java.util.Iterator;
23 import org.turro.auth.Authentication;
24 import org.turro.elephant.context.IConstructor;
25 import org.turro.elephant.entities.db.Poll;
26 import org.turro.marker.ElephantMarker;
27 import org.turro.plugin.contacts.IContact;
35 private String entityPath;
39 this.constructor = constructor;
43 this.entityPath = entityPath;
48 return getPolls(contact).isEmpty();
54 em.
put(
"control",
this);
55 em.
put(
"contact", contact);
56 em.
put(
"polls", getPolls(contact));
57 em.
put(
"entityPath", entityPath);
58 em.
process(
"widgets/webcomp",
"polls");
61 private Collection<Poll> _polls;
63 private Collection<Poll> getPolls(
IContact contact) {
66 Iterator<Poll> it = _polls.iterator();
68 Poll poll = it.next();
static IContact getIContact()
void process(String rootTmpl, String tmpl)
Object put(Object key, Object value)
PollsCtrl(IConstructor constructor)
void renderTemplatePolls()
void setEntityPath(String entityPath)
static List< Poll > getPolls(String entityPath)